Skip to content

Commit d44fa86

Browse files
mswilkisonclaude
andcommitted
docs(rfc-21): Annex A — pin MessageDigest as the padded raw message, not a transcript hash
Review on the paired Rust PR caught the engine seeding the shuffle from its internal SHA256(message) transcript digest while the Go layer seeds from messageDigestFromBigInt(request.Message) -- the padded 32-byte message itself. Make the annex unambiguous: MessageDigest is the raw signing message big-endian left-padded to 32 bytes (>32 significant bytes rejected), never a transcript hash of it; the engine's internal digest feeds only round_id/attempt_id. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent a7dd330 commit d44fa86

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

docs/rfc/rfc-21-roast-coordinator-retry-and-transition-evidence.adoc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,19 @@ fails the drifting side's own unit suite.
754754
The handle is treated as an opaque byte string; implementations
755755
MUST NOT decode it to point bytes before hashing.
756756
* `SessionID`: the session identifier's raw UTF-8 bytes.
757-
* `MessageDigest`: the 32-byte signing message digest.
757+
* `MessageDigest`: the **raw signing message itself**, big-endian
758+
left-padded with zeros to exactly 32 bytes; leading zero bytes are
759+
insignificant, and more than 32 significant bytes MUST be rejected.
760+
This is precisely keep-core's `messageDigestFromBigInt` output: in
761+
BIP-340 production the signed message already is the 32-byte
762+
sighash, so padding is a no-op. Implementations MUST NOT substitute
763+
any transcript hash of the message here -- in particular not the
764+
tbtc-signer engine's internal `SHA256(message_bytes)` digest, which
765+
feeds only the engine's `round_id`/`attempt_id` derivations. Seeding
766+
from the transcript digest instead of the padded message was a
767+
cross-language coordinator divergence caught in review; the
768+
engine-side contract is pinned by
769+
`start_sign_round_accepts_go_derived_attempt_context_in_strict_mode`.
758770
* `AttemptNumber`: the RFC-21 attempt number, **0-based** (attempt
759771
zero is the first attempt). The tbtc-signer FFI `AttemptContext`
760772
carries `wire_attempt_number = AttemptNumber + 1` (1-based, zero

0 commit comments

Comments
 (0)