fix(protocol): domain-separate loc/prf/inv/rcp signatures #20
Loading…
Reference in a new issue
No description provided.
Delete branch "wt/t_ce5649ac"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
loc/prf/inv/rcpsignatures to a type tag so a signature cannot be reinterpreted as another application frame.tag || 0x00 || field…(onionwire-loc-v1,onionwire-prf-v1,onionwire-inv-v1,onionwire-rcp-v1).loc/prf/inv/rcpprefixes, field order, field count, hex signature, freshness/verify semantics.onionwire-invite-v1(untouchedsrc/qr.rs).tests/app_sig.rs: tagged round-trip for all four types, hand-built legacy still verifies,prfandinvsignatures do not verify asrcp.Tradeoff (mixed-version fleets)
Older builds verify only the untagged bytes, so they reject new tagged signatures — fail closed, no downgrade. Outbound application frames from a new sender to an old receiver break until both sides are updated. That is accepted here rather than emitting a compatibility layer that would keep cross-type collisions on the wire.
Verification
cargo test --locked— green (including 10/10 intests/app_sig.rs)cargo clippy --locked --all-targets -- -D warnings— greenprf_signature_does_not_verify_as_rcp/inv_signature_does_not_verify_as_rcpfail if the type tag is dropped because dual-accept would then treat the colliding untagged field layout as valid.Do not merge; leaving for review.