Repository navigation
Conversation
CI runs clippy on the latest stable with -D warnings, and that version rejects uninlined format args, so every pull request fails before its own changes are even checked. Inlines the four format! calls it flags, in the tokio example, the FFI memory hardening test and the protocol tests.
A wallet service hands out a new address for every customer or payment, and today each one needs every party to run derive_child. The group key plus the chain code make a BIP-32 xpub, so a server can derive addresses on its own, and they match the ones the parties later sign for. Adds chain_code() to the key share handle, in Rust, the C API (tss_handle_chain_code) and every binding. DKLs23 returns the chain code made at DKG; FROST Taproot returns the value derive.rs already uses, through one shared helper. Other suites return ProtocolMismatch. Tests check child keys against a separate BIP-32 implementation, and the FFI tests get a shared DKG and signing driver.
Parties lose shares: a disk dies, a server is replaced, a backup is bad. Today the only fix is a new DKG, which means a new key, new addresses and moving every coin on chain. Repair brings the lost party back under the same key. Each helper sends the lost party one masked term; the masks cancel, so the party learns its own share and nothing about the helpers'. It checks the sum against its verifying share and stops on a mismatch. The rebuilt share has no OT state, so signing refuses it until a complete refresh across all parties gives every share new randomness and new OT state. secp256k1 only for now, with C API and Go bindings, and tests in Rust, the FFI and Go.
Repair and the complete refresh add new functions and a new kind of key share, a rebuilt one that can't sign yet, so readers of the spec need to know how they fit with the rest of the API. Updates the API design, FFI and key management pages: the repair flow, the hollow share and when it can sign again, the complete refresh, and the three new C functions.
|
Is there any particular reason why this only works with secp256k1 and not with secp256r1/nist p256? |
|
Placement: the repair protocol belongs in DKLs23, with libtss keeping the handle, C API and bindings. Target DKLs23 0.7.0. Why:
Design reviewed; it is sound:
Required in the DKLs23 version:
Suggest keeping this as a draft. I will port the protocol into @Jossec101 : Another option I am thinking of is adding repair support as a new function instead of adding into ZeroShare and than doing another 0.6.x release together with other improvements, since nobody should be using 0.6.x so far (just pushed it) might not be worth it and instead we go straight into 0.7 with the ideal interfaces. |
RefreshSession::new_dkls runs a DKLs23 complete refresh across all n parties: every share moves by a share of zero, the group key stays the same and the pairwise OT and zero-share state is regenerated. The refresh is written once, generic over the curve, and updates the public key package with DKLs23's PublicKeyPackage::refresh, which verifies every proof commitment. A failed round ends the session. Adds tss_refresh_new_dkls to the C API, NewRefreshSessionDKLs and the Secp256r1ECDSA ciphersuite to the Go binding, tests in Rust, the FFI and Go, and updates the spec. Based on the refresh in #8. Co-authored-by: José A.P <53834183+Jossec101@users.noreply.github.com>
Why
Parties lose shares: a disk dies, a server or enclave gets replaced, a backup turns out to be bad. Today the only fix is a new DKG. That means a new key, new addresses, and moving every coin on chain. If enough parties lose their shares before that happens, the funds are gone.
Repair brings the lost party back under the same key, so nothing changes on chain.
The refresh is needed for two reasons:
What
tss_repair_helper_term,tss_repair_assemble,tss_refresh_new_dkls, plus Go bindings.Depends on
#7, for
chain_code(). Review the last two commits.