fix(service): sign resharing justifications before returning them to the CL#88
Conversation
|
Verified the signing end-to-end against a manufactured resharing complaint on a SGX devnet: the dealer's justification is signed, passes the CL's Schnorr check (zero drops across all nodes), gets processed, and the round recovers. Confirmed the signed bytes match what the CL verifies — kernel signs Two minor notes: the signing path ( |
|
The core fix (signing unsigned resharing justifications and re-emitting stored ones on idempotent retries) is well-reasoned and the test coverage is thorough. Two issues worth addressing before merge:
No other high-confidence issues found. The mutex scope extension across process+persist, the lazy key loading, and the Review iteration 3 · Commit 6b14a37 · 2026-07-23T06:30:30Z |
…the CL
In resharing, kernel keys rotate per round so a dealer is never present in the
new committee (newPresent=false). Kyber's processResharingResponse then builds
the justification without a Schnorr signature, so the CL dropped every resharing
justification ("signature of invalid length 0") and complaint recovery was dead.
Sign the inner vss.Justification with the dealer's prev-round longterm key over
the exact hash the CL verifies; the initial-DKG path stays kyber-signed and is
never re-signed.
59c45b6 to
6b14a37
Compare
Problem
In every resharing round, a dealer's justification is unsigned, so the CL drops it (
schnorr: signature of invalid length 0) and complaint recovery is structurally dead. Keys rotate per round, so a resharing dealer is never in the new committee (newPresent=false); kyber'sprocessResharingResponsethen hand-builds the justification without the Schnorr signature the normal dealing path applies (vss.Dealer.ProcessResponse). Fixed upstream in kyberv4.0.2; we are onv4.0.0-pre2.Fix
vss.Justificationwith the dealer's prev-round longterm key overj.Justification.Hash(suite)— the exact bytes the CL verifies against the dealer's prev-rounddkgPubKey. Only when unsigned, so the initial-DKG path (already kyber-signed) is untouched.EmittedJustifications), and on an idempotent retried complaint re-emit the stored copy so it is not lost.Tests
TestSignResharingJustification_ResharingSignsAndVerifiesTestSignResharingJustification_PassesStoryClientVerificationTestSignResharingJustification_InitialPathUntouchedTestApplyResponses_ResharingJustificationSignedViaWiringTestApplyResponses_KeyLoadFailureDropsJustificationTestApplyResponses_ReEmitsEmittedJustificationOnRetryTestApplyResponses_SeparatesEmittedJustificationsissue: #85