Repository navigation
Add immutable per-party GG20 transcript modes - #9
Conversation
mswilkison
left a comment
There was a problem hiding this comment.
Found one P1 compatibility regression in the legacy T1 bound; see the inline comment.
| q6 := new(big.Int).Mul(q3, q3) | ||
| maxT1 = new(big.Int).Add(pk.N, q6) |
There was a problem hiding this comment.
[P1] Account for the historical witness range in the legacy T1 bound
PR #9 breaks mixed-version legacy signing because historical BobMid and BobMidWC sample betaPrm (the proof’s y) below pkA.N, not q^5 (see the historical implementation). Consequently, honest T1 = e*y + gamma almost always exceeds N + q^6, causing AliceEnd/AliceEndWC to reject historical proofs and abort signing. Derive the finite legacy bound from the historical witness range and add coverage using historical BobMid output; the current compatibility vectors fix y = 11 and miss this failure.
The constant-time keygen and signing e2e tests added on dev construct local parties without choosing a transcript mode, which now panics at party construction. They already set a per-ceremony session nonce, so select security-v2 to keep their existing session-bound behavior. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YPfkvvm5ofFJV7bwtQmAxM
dd461c5 to
4cf0bd7
Compare
…y toggle - Add SetLegacyHistoricalBobCompatibility(bool) to tss.Parameters (default false, legacy-mode only, immutable after FreezeProtocolMode) - Widen legacy T1 verifier bound in signing round 3 only when opt-in is enabled: from tight N + q^6 to historical witness-range bound (q+1)*N derived from T1 = e*y + gamma with e < q, y < N, gamma < N - Default tight bound preserves PR9's hardened behavior; security-v2 unchanged - Prover sampling (y < q^5) and standalone Verify/AliceEnd APIs unchanged New tests: - tss/params_test: guards (mode selection, freeze, security-v2 rejection) - crypto/mta/legacy_bob_historical_witness_test: boundary sweep y=q^5-1, q^5, [q^5,N), N/2, N-1 for Bob and BobWC - crypto/mta/legacy_bob_historical_witness_test: y=N-1 attack family rejection by default, acceptance when opted in - ecdsa/signing/round_3_test: plumbing test proving the flag reaches both AliceEndLegacy and AliceEndWCLegacy checks CHANGELOG: documents rollout-only risk under Unreleased
|
Fix for P1 9-F1 (Historical Bob compatibility) — pushed to this branch Problem: PR #9's tightened legacy verifier ( Solution: Explicit opt-in toggle on
Tests added:
CHANGELOG: Documents rollout-only risk — this toggle accepts historical Bob proofs and carries the historical legacy-mode residual risk; default remains hardened. SHA: |
Bring PR #9 current with dev after #17/#23/#12/#13/#15/#14/#26 landed. Conflicts resolved: - CHANGELOG.md: retain dev's PR #17/#23 composing-PR entry alongside PR #9; keep the rollout-only historical Bob compatibility (8ae2cf8) risk text. - crypto/mta/proofs.go: preserve #9 legacy vs security-v2 tau/gamma sampling branches; keep dev's #15 nil sampling guard on beta. P1 8ae2cf8 opt-in historical Bob compatibility (default tight maxT1, opt-in (q+1)*N bound) unchanged. - crypto/schnorr/schnorr_proof.go: combine #9 legacy/v2 challenge API split with dev's #23 constant-time MulCT branch for t = a + c*x. - ecdsa/keygen/round_3.go: keep #14 unmarshalVSSCommitment part-count guard and re-apply #9 mode-conditional round.proofContext(j) for FactorVerify. - ecdsa/signing/round_ct_wiring_test.go: select ProtocolModeSecurityV2 + nonce for the CT wiring test that constructs local signing parties. Auto-merged and preserved: dev toolchain (Go 1.25.7 / 1.26.8) and deps in go.mod/go.sum, #17 CT default-on behavior and fixed public-width ExpCTWithBitLen calls, #12 arity/input guards, #15 nil/bounds guards, #14 keygen changes, and dev workflows/tests. No transcript mode or CT path was dropped.
|
Merge of PR #9 is now current with dev (post-#17/#23/#12/#13/#15/#14/#26), including the P1 9-F1 fix Conflicts resolved (5):
Preserved from both sides via auto-merge: dev toolchain/deps ( Verification: normal merge commit, standard push (no force). CI is pending — orchestrator will verify build/tests. |
|
Corrective merge of advanced Clean merge, no conflicts. PR #27 contributed one test-only file ( |
|
Integration verification completed before merge into
|
Summary
This is a draft because the transcript boundary needs independent cryptographic review before release use.
Verification
go test ./...go test -race ./tss ./crypto/dlnproof ./crypto/mta ./crypto/paillier ./crypto/schnorr ./ecdsa/keygen ./ecdsa/signinggo vet ./...Rebased onto
dev(2026-09-26)dd461c59a154524cbb8a6ac78a8666b18acc28fcpreserved atbackup/codex/dual-mode-transcript-20260926.4cf0bd74ad91099e5e3441157812006e99423d1f(ondev@349282e).CHANGELOG.mdcomposing-PR list: kept both thePR #19line fromdevand this PR'sPR #9line (PR Add immutable per-party GG20 transcript modes #9 listed after Update protobuf runtime to v1.33.0 #19). If you prefer a different order or wording, edit that list only.4cf0bd7"test: select security-v2 mode in constant-time e2e tests": theTestE2EConcurrentConstantTimetests thatdevadded inecdsa/keygenandecdsa/signingbuild parties without a transcript mode, so they panicked under this PR. They already set a session nonce, so they now callSetProtocolMode(tss.ProtocolModeSecurityV2), the same pattern asTestE2EWithHDKeyDerivation. If you want these tests to cover legacy mode too, turn them into the same legacy/security-v2 subtest loop thatTestE2EConcurrentuses.crypto/dlnproof/proof.goandcrypto/mta/proofs.gomerged automatically withdev's constant-time changes. The PR'sproofChallenge(...)routing sits alongside the new CT branches.devmatches its net diff before the rebase line for line, except for the CHANGELOG context and the two added test lines.go build,go vet, andgo test ./...pass (60m timeout, the same as the Makefile), and so doestestdata/legacy_transcript/verify.sh. Not re-run:-race.