# Cryptographic Inventory Procedure (Prototype Draft)

Run this before changing any code. Final **NIST IR 8547 (27 October 2026)**
deprecates all covered quantum-vulnerable classical public-key algorithms
(RSA, ECDH, ECDSA, EdDSA, DH — regardless of key size) after 31 December 2030
and disallows them after 31 December 2035 (hybrid key establishment remains
permitted past 2035).

Following **NSA Advisory PP-26-4956** (December 2026, directing NSS operators
to inventory elliptic curves outside P-384/P-521 and EdDSA, analyzed by
cryptographers as pointing to 256-bit ECC), **Chrome and Edge stop trusting
ECDSA P-256 CA keys on 15 March 2027** (Firefox has no hard cutoff yet but
prioritized P-384 ahead of X25519/P-256 for classical fallback; Safari has not
announced a cutoff).

## 1. Classify what you find

| Category | Examples | Quantum status (NIST IR 8547 vs CNSA 2.0) | Migration priority |
| :--- | :--- | :--- | :--- |
| Ephemeral key exchange | TLS ECDHE (`X25519`, `P-256`, `P-384`), QUIC, SMTP STARTTLS, SSH `curve25519`, IKEv2 DH | Vulnerable to harvest-now, decrypt-later | **1 (Urgent)** |
| Static key wrapping / KEM | RSA-OAEP, ECIES, HPKE classical KEM, `age` / OpenPGP recipients | Vulnerable to harvest-now, decrypt-later | **1 (Urgent)** |
| Public CA chains & pins | ECDSA P-256 intermediate/root CAs, hardcoded SPKI/cert pins, DANE TLSA pins | **Chrome/Edge distrust P-256 CAs on 15 Mar 2027** | **1 (Immediate if P-256 CA or pinned)** |
| Digital signatures | RSA-PSS/PKCS1v15, ECDSA, Ed25519, JWT `RS256`/`ES256`, SSH host/user keys, code signing | Vulnerable once quantum computers exist (256-bit ECC flagged for priority audit) | **2 (Plan dual-verify cutover)** |
| Symmetric encryption | AES-128/256-GCM, ChaCha20-Poly1305 | **NIST IR 8547:** AES-128 & AES-256 approved (ChaCha20-Poly1305 is IETF RFC 8439, quantum-resistant for non-FIPS TLS). **CNSA 2.0 (NSS):** AES-256 required (AES-128 disallowed). | Keep (replace 3DES/RC4 only; upgrade AES-128 only for CNSA 2.0) |
| Cryptographic hashes | SHA-256, SHA-384, SHA-512, SHA-3 | **NIST IR 8547:** SHA-256+ approved. **CNSA 2.0 (NSS):** SHA-384/512 required (SHA-256 disallowed). | Keep (replace SHA-1/MD5/SHA-224 only; upgrade SHA-256 only for CNSA 2.0) |

### Jurisdiction / compliance checkpoints to confirm with your person

- **Commercial Web (NIST IR 8547):** Deprecated > 2030, disallowed > 2035; hybrid `ML-KEM-768` + `ML-DSA-65`; CA/B Forum SC-081 leaf cap `200d → 100d` (15 Mar 2027) `→ 47d / 10d DCV reuse` (15 Mar 2029).
- **EU / UK / APAC:** EU Coordinated Roadmap (inventories end-2026, high-risk 2030, full 2035); **BSI TR-02102-1 & ANSSI hybrid mandate** (ANSSI stops certifying non-PQC products in 2027); UK NCSC (2028/2031/2035); **Australia ASD ISM disallows classical by end-2030**.
- **US Federal / NSS (EO 14412, OMB M-26-15, CNSA 2.0):** Federal HVAs key establishment 31 Dec 2030 / signatures 31 Dec 2031; CNSA 2.0 acquisition gate **1 Jan 2027** (`ML-KEM-1024`, `ML-DSA-87`, `AES-256`, `SHA-384/512`, single-tree SP 800-208 `LMS`/`XMSS` in HSM only; pure PQC allowed).

## 2. Search the repository (end-to-end, not just crypto imports)

Inspect dependency manifests, **server AND outbound client** TLS configs,
hardcoded pins, serialization/storage, CLI entrypoints, and non-web protocols:

- **Go:** `go.mod` version (Go 1.24+ `crypto/mlkem`, Go 1.26+ SecP ML-KEM hybrids, Go 1.27+ `crypto/mldsa` & `tls.MLDSA44/65/87`); imports of `crypto/tls`, `crypto/rsa`, `crypto/ecdh`, `crypto/ecdsa`, `crypto/ed25519`, `golang.org/x/crypto/ssh`. Check every `&tls.Config{}` (both servers and outbound `http.Client`/`tls.Dial`) for pinned `CurvePreferences` or `MaxVersion`, and check `GODEBUG=tlsmlkem=0` / `tlssecpmlkem=0`.
- **Node.js / TypeScript:** `node -v`, `process.versions.openssl` (Node.js 22.20+ and 24.5+/25/26 bundle OpenSSL 3.5+; ML-DSA landed in 24.6+, ML-KEM `crypto.encapsulate`/`decapsulate` & Web Crypto ML-KEM/ML-DSA in 24.7+), `node:tls`, `node:crypto`, `jose`, `jsonwebtoken`, custom `ecdhCurve` or `ciphers`.
- **Python:** `cryptography` (`pyca/cryptography` v48+ exposes ML-KEM/ML-DSA via OpenSSL 3.5+/4.x, AWS-LC, or BoringSSL backends—not native Rust; v49+ adds X.509 ML-DSA signing/loading, v50+ enables ML-DSA in X.509 verification by default, v51+ bundles OpenSSL 4.1.x and adds OpenSSH `ssh-mldsa44-ed25519` key support), `ssl.SSLContext`, `pyjwt`, `paramiko`, `asyncssh`.
- **Rust:** `rustls` 0.23+ with `aws-lc-rs` (`0.23.48+` always prefers `X25519MLKEM768` regardless of crate features and deprecates `ring`; earlier `0.23.22–0.23.47` used the default `prefer-post-quantum` feature; `ring` lacks ML-KEM), `openssl`, `ed25519-dalek`, `rPGP`.
- **SSH libraries & servers:** `golang.org/x/crypto/ssh`, `SSH.NET`, `AsyncSSH`, `Apache MINA SSHD`, `PuTTY`, and `sshd_config`. Target **OpenSSH 10.6+** (`mlkem768x25519-sha256` KEX per RFC 10042 works immediately by default with no new keys since 10.0; Category 2 hybrid `ssh-mldsa44-ed25519` auth is enabled by default in 10.6 once host/user keys are generated—remove/regenerate any OpenSSH 10.4–10.5 `ssh-mldsa44-ed25519@openssh.com` experimental keys and config entries before upgrading or `sshd` will refuse to start).
- **File / recipient / envelope encryption:** `age`, OpenPGP (`rPGP`/GnuPG), custom KMS/envelope wrappers (use standardized NIST SP 800-227 / X-Wing `draft-connolly-cfrg-xwing-kem` / HPKE `draft-ietf-hpke-pq` combiners; never roll custom HKDF combiners).
- **Edge, Email, Identity & Internal Infrastructure:** `nginx.conf` (`ssl_ecdh_curve`, `ssl_conf_command Groups`, `ssl_protocols`), Envoy, HAProxy, Caddy, Postfix/MTA STARTTLS + MTA-STS + **DANE TLSA pins** (rotating off a P-256 CA breaks pinned TLSA records), Kubernetes Ingress, Istio (`COMPLIANCE_POLICY=pqc`), CDN-to-origin TLS (e.g., Cloudflare Automatic Key Exchange), and OIDC/JWKS/COSE signing keys (RFC 9964 `"kty": "AKP"`).
- **Serialization, storage, pins & CLI entrypoints:** Hardcoded certificate/SPKI pins (mobile/SDK/service clients that break on 15 Mar 2027 CA rotation), database column sizes, PEM/DER/JWK/Bech32/wallet serializers, hardcoded key/signature byte-length checks, and CLI scripts.

## 3. Record every finding before editing

For each site, capture (optionally emitting **CycloneDX 1.6/1.7 CBOM** JSON—prefer 1.7—for
EU end-2026, NIS2, DORA, or OMB M-26-15 compliance):

1. File path, line number, and affected serializers/CLI entrypoints.
2. Role: key exchange, key wrapping, signature, certificate/SPKI/TLSA pin, or protocol framing.
3. Complexity tier: config/binding toggle, library extension, or **multi-step protocol redesign** (stop and escalate protocol redesigns to a human reviewer).
4. Peer/interop profile: public browsers, internal services, mobile apps, or offline stored artifacts (determines classical fallback requirements).
5. Runtime / OpenSSL / OpenSSH version currently deployed and applicable compliance profile (Commercial NIST, EU/BSI/ANSSI, UK NCSC, ASD ISM, or CNSA 2.0).

Proceed to the matching migration guide from `/guides/index.txt`.
