test(sdk-lib-mpc): add DKLS replay/stale-round negative tests - #9441
Open
mmcshinsky-bitgo wants to merge 1 commit into
Open
test(sdk-lib-mpc): add DKLS replay/stale-round negative tests#9441mmcshinsky-bitgo wants to merge 1 commit into
mmcshinsky-bitgo wants to merge 1 commit into
Conversation
mmcshinsky-bitgo
force-pushed
the
pt-000000-mpc-threat-model-tests
branch
from
August 6, 2026 23:01
5aa5b4c to
c07b697
Compare
Cover two adversarial scenarios flagged by the TPA-08 audit gap: - round messages replayed from an independent, concurrent sign session into an unrelated session signing the same message - a stale round-3 message replayed after a session has already advanced to round 4 Both are rejected by the DKLS wasm bindings rather than silently accepted.
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
Test plan
modules/sdk-lib-mpcDKLS Dsg suite locally (mocha --require tsx --node-option experimental-wasm-modules, filtered via--grep): both new tests pass, along with all 11 pre-existing cases in the file.Note on suite-wide flakiness (not caused by this change)
While verifying, the broader
sdk-lib-mpctest suite intermittently throwsUncaught Error: recursive use of an object detected which would lead to unsafe aliasing in rustfrom the DKLS wasm bindings'FinalizationRegistrycallback. This reproduces in unrelated files (test/unit/curves/secp256k1.ts,test/unit/tss/ecdsa/dlogproofs.ts) both with and without this PR's changes — it's a pre-existing GC-timing race in the wasm session cleanup, not something introduced here. This matches a gap already called out in the architecture audit (TPA-08: "review exception paths for WASM/session cleanup... whether serialized session state is always encrypted and integrity-protected"). Flagging here for visibility; not in scope for this test-only PR.