pub fn sign_composite_pq_bound(
ed_sk: &SigningKey,
pq_sk: Option<&MlDsaSigningKey>,
payload: &[u8],
external_aad: &[u8],
) -> Result<Vec<u8>>Expand description
sign_composite, with the inner EdDSA layer additionally committing to the
ML-DSA-65 key above it (see PQ_BINDING_HEADER_LABEL).
Use this wherever a verifier may record the composite’s ML-DSA-65 key rather than resolve it from a trust store. Without the commitment, a valid composite proves possession of the ML-DSA key plus possession of one replayable Ed25519 signature — not of the Ed25519 private key.
Classical mode (pq_sk = None) has no outer key to commit to and is
identical to sign_composite.
The output stays verifiable by verifiers that predate the header: they parse
the protected bucket as received, so the unknown label is carried into the
Sig_structure and simply not interpreted.