P06 — Post-Quantum Primitives: ML-KEM + ML-DSA via liboqs
Status
green· Claim PC6 · Corpus anchor L4 §2 PQC row; maturity M2; registrycaliptra-repofeature lists · Effort S · Execution host external: omarchy
What it proves
PC6 — the post-quantum primitives Caliptra 2.x integrates (ML-DSA firmware signature,
ML-KEM in Adams Bridge) and Rambus markets (“Quantum Safe by design” SKUs) are
standardized, user-runnable software today: ML-KEM (FIPS 203), ML-DSA (FIPS 204), with
a reference implementation (liboqs/OQS) any user can pip install. When the gate prints,
you will have round-tripped the exact NIST-final algorithms and watched tampered
ciphertexts and signatures get rejected.
Why it matters
The corpus’s L4 §2 PQC row sits at maturity M2, and vendor feature lists (registry
caliptra-repo) lean on these primitives existing. The claim is about standardized
primitives — the ones in FIPS 203/204 — so showing them running in the Open Quantum Safe
reference implementation is the direct evidence. If they were not user-runnable today,
the “Quantum Safe by design” product claims downstream of them would rest on paper, not
software.
Why this, not that
| We do (Y) | We don’t (X) | Because |
|---|---|---|
| Exercise the exact NIST-final algorithms (ML-KEM-768, ML-DSA-65) with liboqs | Use a toy “post-quantum” algorithm or a demo lib | The claim is about standardized primitives — the ones in FIPS 203/204 — and liboqs is the Open Quantum Safe reference implementation, the same library the OQS-OpenSSL provider exposes |
| Prove both happy path AND tamper-negation | Only round-trip | Encryption is useless if ciphertext tampering doesn’t fail loudly; signatures are useless if altered messages verify — the negative is the point for weight-protection use |
| Emit a size table vs the FIPS KAT | Assert “PQC exists” from a README | Concrete numbers (pk/ct/sig bytes) let the report map them onto Caliptra’s feature claims (e.g. ML-KEM-768 ciphertext ~1 KB) |
What you need
- Target host is the Linux server (prebuilt
liboqswheels; macOS arm64 has no wheel — build from source per the script’s hint if you want it local). Linux server or macOS;pip install liboqs. (Optional:brew install liboqsfor the C lib.) pip install liboqsgives no working C library on a fresh host — theliboqs-pythonwheel auto-clones and builds liboqs from source on firstimport oqs(needsgit,cmake,ninja/build-essential, and OpenSSL dev headers —libssl-devon Debian/ Ubuntu). Budget several minutes for that one-time build.- liboqs-python 0.16.0’s API is not what older docs describe:
generate_keypair()now returns only the public key (secret key kept internally on the object; useexport_secret_key()if you need it out), andencapsulate/decapsulateare renamedencap_secret/decap_secret.Signature.verify()now requires the public key as a third positional argument. The script in this runbook targets this current API.
How to run it
cd poc/P06-pqc— enter the runbook directory.pip3 install -r requirements.txt— install the Python dependencies.python3 scripts/pqc_roundtrip.py— run the happy path and print the size table.python3 scripts/pqc_roundtrip.py --tamper— run the negative path.
ML-KEM-512/768/1024 and ML-DSA-44/65/87 all ship in liboqs; exercise at least 768/65 (the “datacenter-grade” parameter sets) plus one more.
What “done” looks like
python3 scripts/pqc_roundtrip.py
# MUST print:
# POC-P06-OK: all ML-KEM + ML-DSA mechanisms round-tripped
python3 scripts/pqc_roundtrip.py --tamper
# MUST print:
# POC-P06-TAMPER-DETECTED: ciphertext/sig flipped, decaps/verify rejectedWhere the evidence goes
Copy into evidence/:
roundtrip.log— all mechanisms + size table.tamper.log— negative path.
What this does not prove
- liboqs is a software implementation — this proves primitives exist and run; it does NOT prove Caliptra’s silicon supports them. That stays corpus M2 / B09.