Skip to content

feat(sdk-core): add createOfflineKeyGenFinalizeShare to EddsaMPCv2Utils (reland) - #9941

Merged
Marzooqa merged 1 commit into
masterfrom
wci-890-add-createofflinekeygenround2share
Oct 12, 2026
Merged

Marzooqa merged 1 commit into
masterfrom
wci-890-add-createofflinekeygenround2share

Conversation

@Marzooqa

Copy link
Copy Markdown
Contributor

What

Why

#9918 was stacked on the wci-890-add-createofflinekeygenround2share branch (its base) and was merged into that base branch rather than into master — the branch tip is now #9918's merge commit, but master never received the finalize content. Since master already contains #9917 (the branch's earlier content, merged via 8088fd2), this PR's diff against master is exactly the finalize commit.

Required by WCI-892 (the AWM handler in advanced-wallets), whose finalize shareType delegates to this method.

Test plan

Ticket: WCI-891

@linear-code

linear-code Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

WCI-890

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Unit tests are failing on Node 26.x (Current release line, non-blocking). This is not an LTS version yet, so it does not block merge, but it signals an incompatibility to fix before Node 26.x becomes LTS.

View run

@Marzooqa Marzooqa closed this Oct 12, 2026
@Marzooqa Marzooqa reopened this Oct 12, 2026
@Marzooqa
Marzooqa marked this pull request as ready for review October 12, 2026 10:42
@Marzooqa
Marzooqa requested review from a team as code owners October 12, 2026 10:42
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
Marzooqa force-pushed the wci-890-add-createofflinekeygenround2share branch from 83a530b to 6f5c0cf Compare October 12, 2026 10:47
@Marzooqa
Marzooqa merged commit 12d2a7d into master Oct 12, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants