feat(sdk-core): add getEddsaMpcV2RecoveryKeyShares helper#8913
Closed
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Closed
feat(sdk-core): add getEddsaMpcV2RecoveryKeyShares helper#8913bitgo-ai-agent-dev[bot] wants to merge 1 commit into
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Conversation
Decrypt and CBOR-decode user and backup reduced key shares in parallel, validate that pub and rootChainCode match between the two, then return usable Buffer key shares and the derived commonKeyChain. Also adds a standalone decryptAsync utility to sdk-core (encrypt.ts) that auto-detects v1 SJCL and v2 Argon2id envelopes, requiring @bitgo/argon2 as a new dependency. Ticket: WCI-396 Session-Id: 991c62f4-1a36-4e5b-8507-9e778d77b2e1 Task-Id: 9401c605-944c-4e5b-9659-2ed1470a7f21
94170c3 to
ba5aecf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getEddsaMpcV2RecoveryKeySharesexported from@bitgo/sdk-core— decrypts and CBOR-decodes user and backup EdDSA MPCv2 reduced key shares in parallel, validates thatpubandrootChainCodematch, and returns usableBufferkey shares plus the derivedcommonKeyChainencrypt.tsutility module tosdk-corewith a standalonedecryptAsyncthat auto-detects v1 (SJCL) and v2 (Argon2id + AES-256-GCM) envelopes, andencryptV2for test use@bitgo/argon2as a direct dependency ofsdk-coreto support v2 envelope decryptionTest plan
userKeyShare,backupKeyShare,commonKeyChainkeySharefield throws descriptive errorpubfield throws descriptive errorrootChainCodefield throws descriptive errorpubbetween user and backup throwsrootChainCodebetween user and backup throwsTicket: WCI-396