Commit a7dd330
spec(frost/roast): normative coordinator-seed derivation annex + cross-language conformance vectors
The coordinator-shuffle seed existed in two divergent implementations:
the Go RFC-21 layer derives fold(SHA256(KeyGroup || SessionID ||
MessageDigest)) with 0-based attempt numbers, while the Rust signer's
attempt-context validation used the first 8 bytes of the raw message
digest with 1-based wire attempts (the legacy signingAttemptSeed
convention). Flagged in #4026; at Phase-7 wiring every Go-derived
attempt context would fail Rust-side validation.
This PR makes the Go derivation normative and durable:
- RFC-21 Annex A (normative) specifies the derivation, the
KeyGroupBytes definition for FrostTBTCSignerV1 material, the
0-based/1-based wire mapping (wire = AttemptNumber + 1), wrapping
semantics, and the accepted non-goals (unframed concatenation,
first-8-bytes fold, grindability bounds) with rationale.
- pkg/frost/roast/testdata/coordinator_seed_vectors.json pins ten
end-to-end vectors (seed int64 + selected coordinator), covering
attempt 0/1/5/3/7, sparse and production-size (n=100) member sets,
opaque key-group handles, and negative folded seeds. The file is
regenerated from the Go implementation via
ROAST_SEED_VECTORS_REGEN=1 (TestRegenerateCoordinatorSeedVectors),
so the vectors provably come from the spec'd input matrix.
- TestCoordinatorSeedDerivation_ConformanceVectors consumes the file
and pins DeriveAttemptSeed -> foldAttemptSeed -> SelectCoordinator
end to end, including the wire-mapping invariant and at least one
negative-seed pin so an unsigned port cannot pass.
The Rust signer adopts the same derivation and a byte-identical
vector copy in the paired PR stacked on #4005.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent b7317f2 commit a7dd330
3 files changed
Lines changed: 880 additions & 0 deletions
File tree
- docs/rfc
- pkg/frost/roast
- testdata
Lines changed: 77 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
735 | 812 | | |
736 | 813 | | |
737 | 814 | | |
| |||
0 commit comments