Skip to main content

PQ_BINDING_HEADER_LABEL

Constant PQ_BINDING_HEADER_LABEL 

Source
pub const PQ_BINDING_HEADER_LABEL: &str = "hs-pq-bind";
Expand description

Protected-header label under which the INNER EdDSA layer names the ML-DSA-65 verifying key that must sit above it.

§What this closes

The nested construction binds inner→outer: the outer layer signs payload ‖ inner_signature. It does not bind outer→inner. Without this header the inner EdDSA layer commits to the payload and says nothing about which ML-DSA-65 key is above it, so anyone holding a copy of a valid inner layer — its signature bytes, not the private key — can discard the outer layer, re-sign payload ‖ inner_signature with an ML-DSA key of their own, and produce a composite that verifies completely: ML-DSA key theirs, Ed25519 identity the victim’s.

That asymmetry is harmless as long as the ML-DSA key is always resolved from a trust store (a wrong kid simply fails). It stops being harmless the moment the outer kid becomes a value a verifier records.

A COSE protected header is part of the Sig_structure, so naming the outer key here puts it under the Ed25519 signature: swapping the outer layer now contradicts the inner header, and removing the header breaks the inner signature.

A text label is used deliberately — it needs no IANA code point and cannot collide with a future registry allocation.