feat(sdk-core): add createOfflineKeyGenRound1Share to EddsaMPCv2Utils#9187
Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Draft
feat(sdk-core): add createOfflineKeyGenRound1Share to EddsaMPCv2Utils#9187bitgo-ai-agent-dev[bot] wants to merge 1 commit into
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Conversation
Add createOfflineKeyGenRound1Share to EddsaMPCv2Utils to support the external signer pattern for EdDSA MPCv2 DKG. This method decrypts the caller-provided GPG private key, initializes a DKG session for the given party, produces and signs the round-1 message, then serializes and encrypts the session state so round 2 can resume it later without re-running round 1. Pattern mirrors createOfflineRound1Share (signing) but targets EddsaMPSDkg.DKG instead of EddsaMPSDsg.DSG. The encryptedRound1Session payload includes dkgSession, ownMsgPayload (base64), and ownMsgFrom so that handleIncomingMessages can reconstruct the round-1 DeserializedMessage in round 2. Tests verify: valid signedMsg1 + encrypted session, passphrase binding, session restorability + message verification, and rejection of invalid GPG key material. Ticket: WCI-889 Session-Id: eac7d223-cc21-440f-83a1-6de6cd3cb3b6 Task-Id: 03326a98-89d2-41c6-8fab-6c6040541092
Contributor
6ed644e to
348b90e
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.
What
createOfflineKeyGenRound1Sharemethod toEddsaMPCv2Utilsinmodules/sdk-core/src/bitgo/utils/tss/eddsa/eddsaMPCv2.ts{ signedMsg1: MPSTypes.MPSSignedMessage, encryptedRound1Session: string }, following the same offline signer pattern ascreateOfflineRound1Sharefor signingMPS_DKG_KEYGEN_ROUND1_STATEdomain-separator constant to prevent session ciphertext reuse across signing and key-gen contextsWhy
createKeychainsWithExternalSigner) can be wired up — see WCI-888 for the full scopingTest plan
EddsaMPCv2Utils.createOfflineKeyGenRound1Share— 4 unit tests passeddsaMPCv2.tstest suite (52 tests) passes with no regressionsTicket: WCI-889