feat(frost/roast): Phase 7.2b-2 share-submission member authentication#4059
Merged
mswilkison merged 2 commits intoJun 14, 2026
Conversation
Member-side authentication for the Round2 share submission (completes the sign/authenticate path; network distribution is the next increment). - AuthenticateShareSubmission(verifier, sub, electedCoordinator, liveAttemptContextHash, liveSigningPackageHash): checks signature present, coordinator_id == elected, attempt_context_hash == live, signing_package_hash == the distributed package, then verifies the signature under the submitter's operator key. The signature is verified over sub.SubmitterID(), so a forged submitter_id does not verify. Pass = attributable + package-bound (caller retains for the 7.2b-4 equivocation compare); fail = reject without retention. Membership and de-dup remain the caller's responsibility. Mirrors AuthenticateSigningPackage. - SignShareSubmission(signer, sub): sets SubmitterSignature over SignableBytes. - SigningPackage.EnvelopeHash(): SHA-256 of the on-wire SignedSigningPackage envelope - the value a share commits to in signing_package_hash; stable across the wire (hashes the received bytes verbatim for a parsed package). Tests: round-trip authenticate + 6 rejections (missing/tampered sig, non-elected coordinator, wrong attempt, wrong package, non-submitter signer), end-to-end binding to a real package's EnvelopeHash, and EnvelopeHash wire-stability. Full pkg/frost/roast suite passes under -race. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Folds the #4059 review (Codex + Gemini, converged P2). AuthenticateShareSubmission used the truncating SubmitterID() accessor (uint32 -> uint8) and bytes.Equal without first enforcing structural validation, so a manually-assembled submission with submitter_id=259 signed by member 3 would authenticate AS member 3 (attribution confusion / dedup bypass), and empty live + sub hashes could pass via bytes.Equal(nil, nil). Call Validate() at the top of AuthenticateShareSubmission - it enforces 32-byte hashes, in-range member ids, and a present share before any field is trusted. Apply the same guard to AuthenticateSigningPackage (the merged sibling shares the identical truncating-accessor pattern) so both authentication boundaries are uniform. Tests: out-of-range submitter_id / coordinator_id rejected before verification, for both functions. Full pkg/frost/roast suite passes under -race. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
aa6ad11
into
feat/frost-schnorr-migration-scaffold
15 checks passed
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.
What
Member-side authentication for the Round2 share submission (#4058 added the wire type). This completes the share-submission sign/authenticate path; network distribution is the next increment.
How
AuthenticateShareSubmission(verifier, sub, electedCoordinator, liveAttemptContextHash, liveSigningPackageHash)— mirrorsAuthenticateSigningPackage. In order (cheap → expensive): signature present →coordinator_id == electedCoordinator→attempt_context_hash == live→signing_package_hash == the distributed package→ signature verifies under the submitter's operator key over the domain-tagged body.sub.SubmitterID(), so a forgedsubmitter_iddoesn't verify — the signature binds the declared submitter to the actual signer.SignShareSubmission(signer, sub)— setsSubmitterSignatureoverSignableBytes().SigningPackage.EnvelopeHash()— SHA-256 of the on-wireSignedSigningPackageenvelope, the value a share commits to insigning_package_hash. For a parsed package it hashes the received bytes verbatim, so the submitter and every verifier derive the same binding over the bytes the coordinator distributed.Testing
gofmt/vet/buildclean; fullpkg/frost/roastsuite passes undergo test -race. New tests: round-trip authenticate + 6 rejections (missing/tampered signature, non-elected coordinator, wrong attempt, wrong package, non-submitter signer), an end-to-end binding test (a share bound to a real package'sEnvelopeHashauthenticates; a different package is rejected withErrShareSubmissionWrongPackage), andEnvelopeHashwire-stability.Next
Network distribution of the share submission, then 7.2b-3 (FFI candidate culprits) and 7.2b-4 (equivocation compare + f+1 quorum blame). Carried-forward design item for 7.2b-4: the envelope-hash binding assumes canonical/non-malleable operator signatures (documented on the
signing_package_hashfield) — to be confirmed, or the blame compare made body-aware, before blame lands.🤖 Generated with Claude Code