Skip to content

feat(frost/roast): Phase 7.2b-2 share-submission member authentication#4059

Merged
mswilkison merged 2 commits into
feat/frost-schnorr-migration-scaffoldfrom
feat/phase-7-2b-2-share-auth-2026-06-14
Jun 14, 2026
Merged

feat(frost/roast): Phase 7.2b-2 share-submission member authentication#4059
mswilkison merged 2 commits into
feat/frost-schnorr-migration-scaffoldfrom
feat/phase-7-2b-2-share-auth-2026-06-14

Conversation

@mswilkison

Copy link
Copy Markdown
Contributor

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) — mirrors AuthenticateSigningPackage. In order (cheap → expensive): signature present → coordinator_id == electedCoordinatorattempt_context_hash == livesigning_package_hash == the distributed package → signature verifies under the submitter's operator key over the domain-tagged body.
    • The signature is verified over sub.SubmitterID(), so a forged submitter_id doesn't verify — the signature binds the declared submitter to the actual signer.
    • Pass = attributable + package-bound, so the caller retains the exact received bytes for the 7.2b-4 equivocation compare; fail = reject without retention. Included-set membership and de-dup remain the caller's responsibility.
  • 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. 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/build clean; full pkg/frost/roast suite passes under go 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's EnvelopeHash authenticates; a different package is rejected with ErrShareSubmissionWrongPackage), and EnvelopeHash wire-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_hash field) — to be confirmed, or the blame compare made body-aware, before blame lands.

🤖 Generated with Claude Code

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>
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: af5415b1-ad3f-4172-82f6-7dc89570e6c3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/phase-7-2b-2-share-auth-2026-06-14

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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>
@mswilkison mswilkison merged commit aa6ad11 into feat/frost-schnorr-migration-scaffold Jun 14, 2026
15 checks passed
@mswilkison mswilkison deleted the feat/phase-7-2b-2-share-auth-2026-06-14 branch June 14, 2026 19:41
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