Skip to content

feat(tss): bump tss-lib v2.0.3 to v3.0.1 - #164

Open
vietddude wants to merge 1 commit into
masterfrom
feat/bump-tss-lib-v3
Open

feat(tss): bump tss-lib v2.0.3 to v3.0.1#164
vietddude wants to merge 1 commit into
masterfrom
feat/bump-tss-lib-v3

Conversation

@vietddude

@vietddude vietddude commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrate to fystack/tss-lib v3.0.1 (GG20 session binding + SRC-2026-573 hardening). Module path bumped v2v3 across root and e2e modules.

The only API break requiring code changes: ckd.ExtendedKey.PublicKey moved from *crypto.ECPoint to ecdsa.PublicKey. Adapted pkg/mpc/ckd.go — the ECDSA/EdDSA UpdateSinglePublicKeyAndAdjustBigXj helpers now take an ecdsa.PublicKey child key and convert internally.

Compatibility with existing (v2-generated) wallets

  • Key shares load unchangedLocalPartySaveData JSON format is identical between v2.0.3 and v3.0.1 (only import paths differ).
  • EdDSA CKD addresses unchanged — mpcium's own derivation already reduced IL mod N; v3 now matches it (v3 actually fixes non-hardened EdDSA CKD, which errored ~94% of the time under v2).

Tests added

  • pkg/ckdutil/golden_compat_test.go — golden vectors pinning ECDSA/EdDSA child pubkeys so any future derivation drift fails loudly.
  • pkg/mpc/ckd_update_test.go — invariants of the CKD update-and-adjust helpers.

Verification

  • Unit tests: all green.
  • e2e on 3 real v3 nodes: TestKeyGeneration, TestSigning, TestCKDSigning (ECDSA+EdDSA), TestResharing + signing-after-reshare — all PASS, 0 fail / 0 skip.

⚠️ Operational note

v3 binds ssid into proofs, so v2 and v3 nodes cannot interoperate. All 3 nodes must be upgraded together (no rolling/mixed-version rollout).

Migrate to fystack/tss-lib v3.0.1 (GG20 session binding + SRC-2026-573
hardening). Update module path v2->v3 across root and e2e modules.

Adapt pkg/mpc/ckd.go to the v3 API change where ckd.ExtendedKey.PublicKey
moved from *crypto.ECPoint to ecdsa.PublicKey; the ECDSA/EdDSA
UpdateSinglePublicKeyAndAdjustBigXj helpers now take an ecdsa.PublicKey
child key and convert internally.

Compatibility with v2-generated wallets verified:
- LocalPartySaveData JSON format unchanged; existing shares load and sign.
- EdDSA CKD addresses unchanged (local reimpl already reduced IL mod N,
  which v3 now matches).

Add regression tests:
- pkg/ckdutil golden vectors pinning ECDSA/EdDSA child pubkeys so any
  future derivation drift fails loudly.
- pkg/mpc CKD update-and-adjust invariants.

Verified: unit tests + full e2e (keygen, signing, CKD signing, resharing)
green on 3 v3 nodes.
@vietddude
vietddude force-pushed the feat/bump-tss-lib-v3 branch from 186564b to f9ae2e1 Compare August 31, 2026 02:55
@sonarqubecloud

Copy link
Copy Markdown

@vietddude
vietddude requested a review from anhthii August 31, 2026 03:17
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