RFC-0020: Post-Quantum Hybrid Audit Chain¶
Status: Proposed; amends RFC-0014 with a second record schema.
Owner: Audit and security leads.
Last updated: 2026-11-29
Context¶
RFC-0014 signs every audit record with Ed25519, so the trail is forgeable by anyone who can forge Ed25519 signatures. Audit trails are kept for years and are evidence; a future quantum computer that breaks Ed25519 could rewrite a trail whose signatures were trusted when they were made. RFC-0017 already protects envelope confidentiality against that adversary; this RFC does the same for the integrity of the audit trail. ML-DSA (FIPS 204, August 2024) is available in pyca/cryptography’s default wheels.
Binding decision¶
audit.chain.HybridSigningKey(ed25519_key, mldsa65_key)signs a record with Ed25519 and ML-DSA-65. The record signature is the 64-byte Ed25519 signature followed by the 3,309-byte ML-DSA-65 signature over the same message as RFC-0014. ML-DSA uses the signing context"cryptography-suite/v4 audit chain", so a signature made by the same key for any other purpose does not verify here.HybridVerifyingKey.verifyaccepts a record only when both signatures verify. The trail stays unforgeable while either scheme holds.Records written with a hybrid key carry
"schema": "cs-audit-chain/2"; everything else is RFC-0014 unchanged. The schema is inside the hashed and signed record, andverify_audit_chainderives the accepted schema from the key it is given: an Ed25519 key accepts onlycs-audit-chain/1, aHybridVerifyingKeyonlycs-audit-chain/2. A hybrid trail therefore cannot be downgraded to, or verified as, an Ed25519-only trail. Verifiers must keep the hybrid verifying key, not only its Ed25519 half.HybridSigningKey.generate()needs a backend with ML-DSA and otherwise raises pyca/cryptography’sUnsupportedAlgorithm.
This is an “AND” combination of two independent signatures over one message. It is not the IETF composite-signature encoding (draft-ietf-lamps-pq-composite-sigs); records are not X.509 objects, and the schema change keeps the two encodings from being confused.
Consequences¶
Each record grows by about 4.4 KB of base64 signature, within the 64 KiB line bound.
Signing cost rises by one ML-DSA-65 signature per record. Measured on the development machine (Windows, Python 3.13, cryptography 50.0.2): about 1.5 ms to sign and 0.4 ms to verify a hybrid record. Services that audit at very high rates should batch or sample at the sink.
Test and validation requirements¶
tests/unit/test_audit_chain_post_quantum.py covers a trail produced by real
Protector operations and verified against an external checkpoint, the
requirement for both signatures (either half replaced, truncated, or
missing), schema separation and the downgrade attempt, key typing and repr
redaction, and the ML-DSA signing context. The tests are skipped on backends
without ML-DSA.