Skip to content

feat(sdk-core): add verifyPeerMessageRoundThree to EddsaDSGMethods - #9409

Open
ralph-bitgo[bot] wants to merge 2 commits into
masterfrom
WCI-1191-add-verify-peer-message-round-three
Open

feat(sdk-core): add verifyPeerMessageRoundThree to EddsaDSGMethods#9409
ralph-bitgo[bot] wants to merge 2 commits into
masterfrom
WCI-1191-add-verify-peer-message-round-three

Conversation

@ralph-bitgo

@ralph-bitgo ralph-bitgo Bot commented Aug 4, 2026

Copy link
Copy Markdown

What

  • Add verifyPeerMessageRoundThree to modules/sdk-core/src/bitgo/tss/eddsa/eddsaMPCv2.ts, mirroring the call signature of verifyPeerMessageRoundOne/verifyPeerMessageRoundTwo. It decodes and GPG-verifies the MPS DSG round-3 message via MPSComms.verifyMpsMessage and returns the deserialized message.
  • Since no EddsaMPCv2SignatureShareRound3Output type exists in @bitgo/public-types (only Round3Input is defined), the inline structural type { data: { msg3: EddsaMPCv2SignedMessage } } is used for the parameter, matching the actual wire shape.
  • Add unit tests covering the happy path (verifying a genuine BitGo round-3 message through a full DSG handshake) and the tampered-signature rejection path, mirroring the existing round1/round2 test coverage.

Why

  • EddsaDSGMethods already exposes symmetric verifyPeerMessageRoundOne/verifyPeerMessageRoundTwo helpers for rounds 1 and 2, but round 3 had no equivalent — forcing callers to inline MPSComms.verifyMpsMessage directly instead of using a consistent helper. This completes the set so a follow-up caller (WCI-1194) can use the same pattern for all three rounds.

Test plan

  • yarn lint passes
  • yarn tsc --build compiles clean
  • New and existing unit tests in test/unit/bitgo/utils/tss/eddsa/eddsaMPCv2.ts pass

Ticket: WCI-1191

Add verifyPeerMessageRoundThree to
modules/sdk-core/src/bitgo/tss/eddsa/eddsaMPCv2.ts, mirroring the
call signature of verifyPeerMessageRoundOne and
verifyPeerMessageRoundTwo. It decodes and GPG-verifies the MPS DSG
round-3 message via MPSComms.verifyMpsMessage.

Round 3 previously had no such helper, forcing callers to inline
MPSComms.verifyMpsMessage directly instead of using the symmetric
round1/round2 helpers already exposed by EddsaDSGMethods.

Ticket: WCI-1191
Session-Id: 0716649e-75cb-46dd-8d6a-ae0a701167d6
Task-Id: 3a82317d-853d-4878-97a8-50cf6fa938c5
@linear-code

linear-code Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

WCI-1191

@bitgo-ai-agent-dev
bitgo-ai-agent-dev Bot force-pushed the WCI-1191-add-verify-peer-message-round-three branch from a2af08d to fd0af2a Compare August 4, 2026 10:16
@ralph-bitgo
ralph-bitgo Bot force-pushed the WCI-1191-add-verify-peer-message-round-three branch from fd0af2a to 89afad6 Compare August 4, 2026 10:16
Replace the manual initDsg/getFirstMessage/handleIncomingMessages
handshake in the verifyPeerMessageRoundThree happy-path test with
MPSUtil.executeTillRound(2, ...) from @bitgo/sdk-lib-mpc, which already
drives two DSG parties to the requested round and is used for the same
purpose in sdk-lib-mpc's own DSG tests.

This removes duplicated round1/round2 handshake code from the test so
it exercises only what verifyPeerMessageRoundThree needs, matching the
existing helper pattern instead of re-deriving it inline.

Ticket: WCI-1191
Session-Id: 0716649e-75cb-46dd-8d6a-ae0a701167d6
Task-Id: 3a82317d-853d-4878-97a8-50cf6fa938c5
@bitgo-ai-agent-dev
bitgo-ai-agent-dev Bot force-pushed the WCI-1191-add-verify-peer-message-round-three branch from b5b4009 to 909e35f Compare August 4, 2026 11:19
@ralph-bitgo
ralph-bitgo Bot force-pushed the WCI-1191-add-verify-peer-message-round-three branch from 909e35f to b211da1 Compare August 4, 2026 11:19
@ralph-bitgo
ralph-bitgo Bot marked this pull request as ready for review August 4, 2026 11:20
@ralph-bitgo
ralph-bitgo Bot requested review from a team as code owners August 4, 2026 11:20
@vibhavgo
vibhavgo requested a review from Marzooqa August 4, 2026 14:57
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.

1 participant