Expand description
Production signer/verifier adapters over hyprstream_rpc::crypto::cose_sign,
mirroring crate::mac::compiled::cose.
S8 (#574): the signer is policy-aware. Construct it via
[CoseAuditSigner::new] with the node’s enforced
CryptoPolicy. Under a Hybrid policy
it FAILS CLOSED at sign time if no ML-DSA-65 key is provisioned — an audit
record is a security-critical accounting artifact and silently emitting an
Ed25519-only signature under a Hybrid policy would be an in-band downgrade.
The construction is the hybrid nested COSE composite; the key management is
the caller’s job (the node provisions the PQ audit key from the same
MlDsaSigningKeyStore the token mint uses).
Structs§
- Cose
Audit Signer - Hybrid (EdDSA + ML-DSA-65) signer for audit records, policy-aware.
- Cose
Audit Verifier - Hybrid verifier.
require_pq = trueenforces the ML-DSA outer layer. - Owned
Cose Audit Signer - Owned-key variant of
CoseAuditSigner(B2, #674): production wiring stores this onOAuthState/AuditedAvc, both of which must be'static— a borrowed signer cannot live there. HoldsArcs to the same key material a borrowedCoseAuditSignerwould reference (a startup-time snapshot of the node’s active EdDSA + ML-DSA-65 keys), and signs with the IDENTICAL fail-closed logic: under Hybrid, a missing PQ key fails everysigncall rather than downgrading.
Constants§
- AUDIT_
AAD - Domain-separation AAD for audit-record signatures (distinct from policy/envelope AADs so an audit signature can never be replayed as another message type).