Open
Conversation
Introduces the DSG (Distributed Sign Generation) class for EdDSA MPCv2 using the @bitgo/wasm-mps WASM bindings. The class mirrors the existing DKG pattern with explicit state management and session export/restore support for server-side persistence across rounds. - Add `DSG` class with 4-round signing protocol state machine (Init → WaitMsg1 → WaitMsg2 → WaitMsg3 → Complete) - Add `DsgState` enum to types.ts - Export `EddsaMPSDsg` namespace from index.ts - Add `runEdDsaDSG` test helper to util.ts - Add unit tests covering full 2-of-3 signing, session restore, message serialization, error handling, and derivation paths Ticket: WCI-164
ae4f5eb to
e058c93
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
This PR introduces the
DSG(Distributed Sign Generation) class for EdDSA MPCv2 insdk-lib-mpc, wrapping the@bitgo/wasm-mpsWASM bindings for the 2-of-3 threshold Multi-Party Schnorr signing protocol. The class follows the same design pattern as the existingDKGclass — explicit round-state management with session export/restore — so state can be persisted to a database between HTTP round-trips.Ticket: WCI-164
Changes
dsg.ts— NewDSGclass with 4-round state machine (Init → WaitMsg1 → WaitMsg2 → WaitMsg3 → Complete), wrappinged25519_dsg_round{0..3}_process.getSession()/restoreSession()serialise state to/from JSON for DB persistence.types.ts— AddsDsgStateenum mirroringDkgState.index.ts— ExportsDSGunder theEddsaMPSDsgnamespace.test/unit/tss/eddsa/dsg.ts— Tests covering: full 2-of-3 signing across allparty-pair combos, session restore continuity, message serialization, derivation-path
differentiation, and error-handling guards.
test/unit/tss/eddsa/util.ts— AddsrunEdDsaDSGtest helper.Test Plan
yarn unit-test --scope @bitgo/sdk-lib-mpc— all tests passCLOSES TICKET: WCI-164