Repository navigation
feat(sdk-core): add createOfflineKeyGenFinalizeShare to EddsaMPCv2Utils (reland) - #9941
Merged
Merged
Conversation
Contributor
Contributor
|
|
Add createOfflineKeyGenFinalizeShare to EddsaMPCv2Utils in sdk-core, completing the three offline signer methods for the EdDSA MPCv2 external-signer key generation flow (WCI-888 plan). The method decrypts the persisted round-2 session, restores the DKG state, reconstructs the own round-2 message from the persisted payload, verifies and deserializes the incoming BitGo and counterParty round-2 messages via MPSComms.verifyMpsMessage, feeds all three into dkg.handleIncomingMessages (asserting no output messages remain), asserts dkg.getCommonKeychain() matches the bitgoCommonKeychain returned by WP round 2 (commonPublicKeychain), and returns { commonKeychain, keyShare } with the full key share base64-encoded. The round-2 session blob is bound to the caller via validateAdata before decryption: the optional partyId param (defaulting to USER, matching the other keygen methods) is validated against the envelope's adata, so a blob encrypted for the other source fails loudly instead of silently finalizing the DKG as the wrong party. Note: unlike the WCI-891 draft signature, this method does not take encryptedUserGpgPrvKey — finalize only verifies peer messages with their public keys and never signs, so the GPG private key is never decrypted on this path. Depends on the async DKG.restoreSession (WASM load) and createOfflineKeyGenRound2Share from the stacked WCI-890 branch. Ticket: WCI-891
Marzooqa
force-pushed
the
wci-890-add-createofflinekeygenround2share
branch
from
October 12, 2026 10:47
83a530b to
6f5c0cf
Compare
vibhavgo
approved these changes
Oct 12, 2026
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
createOfflineKeyGenFinalizeShareonmaster— the third and final offline signer method for the EdDSA MPCv2 external-signer key generation flowmodules/sdk-core/src/bitgo/utils/tss/eddsa/eddsaMPCv2.tsplus its test suiteWhy
#9918 was stacked on the
wci-890-add-createofflinekeygenround2sharebranch (its base) and was merged into that base branch rather than intomaster— the branch tip is now #9918's merge commit, butmasternever received the finalize content. Sincemasteralready contains #9917 (the branch's earlier content, merged via 8088fd2), this PR's diff againstmasteris exactly the finalize commit.Required by WCI-892 (the AWM handler in advanced-wallets), whose
finalizeshareType delegates to this method.Test plan
bitgoCommonKeychainrejection, wrong-party round-2 session rejection viavalidateAdata(partyIdparam), wrong passphrase, tampered messages, non-BitGo pub key in prod env,getReducedKeySharenot calledmodules/sdk-core/test/unit/bitgo/utils/tss/eddsa/eddsaMPCv2.tspass on the branch (102 after feat(sdk-core): add createOfflineKeyGenRound2Share to EddsaMPCv2Utils #9917's merge + 8 finalize-related)Ticket: WCI-891