/Post Quantum
01 · Priorities

What to migrate first

Recorded TLS and SSH traffic can be decrypted later if classical key exchange breaks. Signatures only fail against live forgery. Migrate key exchange now, replace internal asymmetric tokens with HMAC, and leave AES-256 storage alone.

1. Key exchange

Enable X25519MLKEM768 on TLS 1.3 and mlkem768x25519-sha256 on SSH so recorded traffic cannot be decrypted later.

2. Tokens & signatures

Switch internal RS256/ES256 JWTs to 256-bit HS256 HMAC. Add dual Ed25519 + ML-DSA-65 signatures to software updaters.

3. Symmetric & hashes

AES-256, ChaCha20, and SHA-256 are not vulnerable to Shor's algorithm. Disks and database volumes do not need re-encryption.

Migration Order

P0 · Rank 01 Days 1–3

Edge CDN & Origin Load Balancer TLS Key Exchange

Enable hybrid post-quantum key agreement on public domains and origin cloud load balancers (AWS ALB, GCP, NGINX/Envoy). Close the CDN-to-origin public internet gap.

ECDHE X25519 → X25519MLKEM768 (0x11ec)
Infra · Config Toggle
TLS blueprint →
P0 · Rank 02 Days 1–7

OpenSSH Bastions, Production Hosts & CI Runners

Pin post-quantum hybrid key exchange in sshd_config across bastions, production hosts, and CI runners.

curve25519-sha256 → mlkem768x25519-sha256
Infra · 1-Line Config
SSH blueprint →
P1 · Rank 03 Days 7–21

Outbound Application Runtimes & Database Wire TLS

Upgrade service runtimes so outbound HTTPS requests (Stripe, LLM APIs, AWS KMS) and Postgres/Redis connections offer X25519MLKEM768 in their ClientHello.

Go 1.24+ · Rustls (aws-lc-rs) · OpenSSL 3.5+
Backend · Base Images
Runtime guide →
P1 · Rank 04 Days 14–30

Internal Same-Boundary JWTs & Signed URLs

Where your backend both issues and verifies tokens, replace RS256 / ES256 with 256-bit HS256 HMAC. Removes public keys and avoids 4.4 KB post-quantum signature headers.

RS256 / ES256 → HS256 (256-bit secret)
Backend · Code Change
JWT blueprint →
P2 · Rank 05 Days 30–60

WireGuard Mesh Overlays & Site-to-Site IPsec

Standard WireGuard uses classical Curve25519. Mix a 256-bit PresharedKey rotated via Rosenpass, and enforce PQ-TLS inside the tunnel.

Curve25519 Noise → PSK + Rosenpass ML-KEM
Infra · Mesh Config
VPN blueprint →
P3 · Rank 06 Days 45–90

Desktop/CLI Auto-Updaters & Container Signing

Require dual signature verification (classical Ed25519 + post-quantum ML-DSA-65) in update manifests before executing downloaded binaries.

Ed25519 → Ed25519 + ML-DSA-65 (Composite)
Client · Release Pipeline
Updater spec →
P4 · Rank 07 Days 60–180+

Short-Lived WebPKI Certs, Internal mTLS & Storage Audit

Automate 7-day ACME leaf certificates while browsers adopt Merkle Tree Certificates. TLS 1.3 certificates authenticate live handshakes; they do not encrypt recorded traffic.

7-Day ACME · Internal ML-DSA-65 mTLS · AES-256
Security · PKI Hygiene
PKI blueprint →
/Post Quantum
02 · Checklist

Migration checklist

Twelve changes across network transit, tokens and signatures, and storage.

25%
Overall Readiness (3/12)
20%
Transit HNDL Defense
25%
Signature & Token Resilience

Phase A · Transit Key Exchange (Days 1–30)

Stops Harvest-Now, Decrypt-Later

Phase B · Tokens, Signatures & PKI (Days 15–90)

Stops Real-Time Token & Binary Forgery

Phase C · At-Rest Baseline & Continuous CI Gates

Inventory & Regression Prevention
/Post Quantum
03 · Systems

System configurations

Configuration changes by system.

P0 · Network Ingress & Origin Hop

Edge CDN & Load Balancer TLS (`X25519MLKEM768`)

Hybrid key exchange combines classical X25519 and NIST FIPS 203 ML-KEM-768 inside the TLS 1.3 key schedule (codepoint 0x11ec). Handshake size grows by ~1.2 KB and remains backward-compatible with older clients.

nginx.conf (OpenSSL 3.5+) & AWS ALB Terraform
# NGINX / Ingress Controller
ssl_protocols TLSv1.3;
ssl_ecdh_curve X25519MLKEM768:X25519:secp256r1;

# AWS Application Load Balancer (closes CDN-to-Origin gap)
resource "aws_lb_listener" "https" {
  port            = 443
  protocol        = "HTTPS"
  ssl_policy      = "ELBSecurityPolicy-TLS13-1-2-PQ-2025-09"
  certificate_arn = aws_acm_certificate.default.arn
}

CDN-to-origin traffic

Enabling PQ-TLS at Cloudflare only protects the browser-to-CDN leg. Unless your AWS ALB or origin ingress also enables X25519MLKEM768, traffic between the CDN and your cloud VPC crosses public peering links over classical X25519.

Classical certificates in TLS 1.3

In TLS 1.3, the certificate signs the live handshake transcript; it does not encrypt the session key. Pairing X25519MLKEM768 with an existing ECDSA certificate protects recorded traffic.

/Post Quantum
04 · Audit & Agents

Check your systems

CLI probes for live TLS and SSH endpoints, followed by repository audit prompts for coding agents.

1. Live Endpoint Probes

Inspect actual negotiated handshakes
1. Probe Public HTTPS & Origin ALB
openssl s_client -connect api.yourdomain.com:443 -tls1_3 \
  -groups X25519MLKEM768:X25519 </dev/null 2>/dev/null \
  | grep -E "Negotiated TLS1.3 group|Server Temp Key"

# Pass: Negotiated TLS1.3 group: X25519MLKEM768
# Fail: Server Temp Key: X25519, 253 bits
2. Probe Production SSH Bastions
ssh -vvv -o BatchMode=yes -o ConnectTimeout=5 \
  bastion.yourdomain.com 2>&1 | grep "kex: algorithm:"

# Pass: kex: algorithm: mlkem768x25519-sha256
# Fail: kex: algorithm: curve25519-sha256

2. Coding-Agent Prompts

Copy and run against your repos

01 · Repository cryptographic inventory

Locates every TLS config, SSH client, JWT verifier, and key-wrapping call across your application monorepo.

Paste into coding agent in application repo
Build a Cryptographic Bill of Materials (CBOM) for this repository to assess our Post-Quantum Cryptography readiness. Inspect actual source files, lockfiles, and Dockerfiles:

1. TLS & Runtimes: Check our Go version (go.mod), Rust TLS crates (Cargo.lock), and container base images (OpenSSL version). Flag any TLS config that hardcodes classical curves (`CurvePreferences`, `ecdhCurve`, `ssl_ecdh_curve`) and blocks `X25519MLKEM768`.
2. JWTs & Sessions: Find every JWT sign/verify call (`jsonwebtoken`, `jose`, `golang-jwt`, `PyJWT`) and custom signature check. Record the algorithm (`RS256`, `ES256`, `EdDSA`, `HS256`) and whether the issuer and verifier share the same trust boundary.
3. SSH Clients: Find programmatic SSH usage (`x/crypto/ssh`, `paramiko`, `ssh2`, `russh`) and check supported `KexAlgorithms`.
4. Key Wrapping & At-Rest: Find all KMS calls and envelope encryption; flag any static `RSA-OAEP` or `RSAES_PKCS1_V1_5` wrapping.

Output a markdown table: [File:Line] | [Component] | [Current Primitive] | [Exposure: HNDL vs Live Forgery vs Safe] | [Exact Fix].

02 · Terraform, ingress, and SSH config audit

Audits cloud load balancers, CDN origin hops, ingress controllers, and bastion configs for classical key-exchange gaps.

Paste into coding agent in infrastructure / IaC repo
Audit all Terraform (`.tf`), Helm charts, Kubernetes manifests, and server provisioning scripts in this repo for Post-Quantum Key Exchange:

1. Cloud Load Balancers: Find every `aws_lb_listener`, `aws_alb_listener`, or GCP/Azure SSL policy. Flag any listener not using a PQ TLS 1.3 policy (`ELBSecurityPolicy-TLS13-1-2-PQ-2025-09`).
2. Ingress & CDN Origin: Inspect NGINX/Envoy/Istio configs and Cloudflare origin settings for missing `X25519MLKEM768` key exchange.
3. OpenSSH: Inspect all `sshd_config` templates and cloud-init scripts; ensure `KexAlgorithms` prioritizes `mlkem768x25519-sha256,sntrup761x25519-sha512@openssh.com`.
4. Produce a P0-P3 patch plan with exact file diffs.

03 · Internal JWTs and updater signatures

Migrates internal tokens away from asymmetric public keys and designs composite `Ed25519 + ML-DSA-65` release verification.

Paste into coding agent for auth & release pipelines
Audit all token authentication and binary update verification flows in this codebase:

1. Same-Boundary JWTs: Find every JWT or signed cookie where our backend is both issuer and verifier. Draft a zero-downtime migration from `RS256`/`ES256`/`EdDSA` to 256-bit `HS256` HMAC with strict `algorithms: ['HS256']` verification.
2. Auto-Updaters: Inspect our desktop/CLI self-updater verification logic and design a dual-signature check requiring BOTH classical `Ed25519` and NIST FIPS 204 `ML-DSA-65` signatures to pass before executing an update.
/Post Quantum
05 · Failure Modes

What breaks when a primitive fails

Select a primitive family to see what an attacker can do if it breaks, what stays unaffected, and which change mitigates it.

Scenario 01 · Elliptic-Curve & Finite-Field Diffie-Hellman Breaks

Recorded sessions are decrypted offline

An attacker with saved packet captures (.pcap) recovers the ephemeral private key from the recorded handshake, derives the session key, and decrypts the archived payload offline.

Step 1

Traffic capture

During a classical X25519 TLS 1.3 or SSH handshake, ephemeral public keys g^a and g^b cross the wire in plaintext before encrypting the session with AES-256.

Step 2

Key recovery

The adversary computes the private scalar a from the archived plaintext g^a, reconstructs the shared secret g^(ab), and derives the exact AES-256 session key offline.

Step 3

Exposed data

Decrypting old SSH and HTTPS sessions exposes every unrotated credential sent inside them: production DB passwords, .env files, API keys, and customer PII.

Mitigation: hybrid key exchange

TLS 1.3 derives the session key from HKDF(SharedSecret_X25519 || SharedSecret_MLKEM768). Even if X25519 is completely broken later, the attacker cannot recover the ML-KEM-768 secret from the recorded ciphertext.

Action

Enable X25519MLKEM768 on all ingress/origin TLS and mlkem768x25519-sha256 on OpenSSH, then rotate any long-lived secrets that previously traversed classical channels.