Skip to Content
PoC BatteryP06 — Post-Quantum Crypto

P06 — Post-Quantum Primitives: ML-KEM + ML-DSA via liboqs

Status green · Claim PC6 · Corpus anchor L4 §2 PQC row; maturity M2; registry caliptra-repo feature 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 liboqsUse a toy “post-quantum” algorithm or a demo libThe 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-negationOnly round-tripEncryption 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 KATAssert “PQC exists” from a READMEConcrete 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 liboqs wheels; 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 liboqs for the C lib.)
  • pip install liboqs gives no working C library on a fresh host — the liboqs-python wheel auto-clones and builds liboqs from source on first import oqs (needs git, cmake, ninja/build-essential, and OpenSSL dev headers — libssl-dev on 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; use export_secret_key() if you need it out), and encapsulate/decapsulate are renamed encap_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

  1. cd poc/P06-pqc — enter the runbook directory.
  2. pip3 install -r requirements.txt — install the Python dependencies.
  3. python3 scripts/pqc_roundtrip.py — run the happy path and print the size table.
  4. 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 rejected

Where 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.
Last updated on
Superdefence II — defensive security research.