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.
X25519MLKEM768 (0x11ec)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.
Enable X25519MLKEM768 on TLS 1.3 and mlkem768x25519-sha256 on SSH so recorded traffic cannot be decrypted later.
Switch internal RS256/ES256 JWTs to 256-bit HS256 HMAC. Add dual Ed25519 + ML-DSA-65 signatures to software updaters.
AES-256, ChaCha20, and SHA-256 are not vulnerable to Shor's algorithm. Disks and database volumes do not need re-encryption.
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.
X25519MLKEM768 (0x11ec)Pin post-quantum hybrid key exchange in sshd_config across bastions, production hosts, and CI runners.
mlkem768x25519-sha256Upgrade service runtimes so outbound HTTPS requests (Stripe, LLM APIs, AWS KMS) and Postgres/Redis connections offer X25519MLKEM768 in their ClientHello.
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.
HS256 (256-bit secret)Standard WireGuard uses classical Curve25519. Mix a 256-bit PresharedKey rotated via Rosenpass, and enforce PQ-TLS inside the tunnel.
PSK + Rosenpass ML-KEMRequire dual signature verification (classical Ed25519 + post-quantum ML-DSA-65) in update manifests before executing downloaded binaries.
Ed25519 + ML-DSA-65 (Composite)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.
ML-DSA-65 mTLS · AES-256Twelve changes across network transit, tokens and signatures, and storage.
Configuration changes by system.
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 / 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
}
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.
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.
OpenSSH 9.9+ defaults to NIST mlkem768x25519-sha256 (and 9.0+ supports sntrup761x25519-sha512@openssh.com), but CIS/STIG hardening templates routinely overwrite KexAlgorithms with classical curves.
# Enforce hybrid post-quantum key exchange only KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512@openssh.com # 256-bit symmetric ciphers (already post-quantum safe) Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com
Before removing curve25519-sha256, verify CI workers using golang.org/x/crypto/ssh or Python Paramiko have been updated to releases supporting mlkem768x25519-sha256.
Run sudo sshd -T | grep kexalgorithms on every host to confirm no drop-in file under /etc/ssh/sshd_config.d/ re-enables classical Diffie-Hellman.
An ML-DSA-65 signature is 3,309 bytes raw (~4.4 KB Base64), breaking 4 KB cookie and 8 KB HTTP header limits. For tokens issued and verified inside your own backend boundary, switch to 256-bit HS256 HMAC.
const HMAC_SECRET = Buffer.from(process.env.JWT_HMAC_256_HEX!, 'hex'); // 32 bytes
export function signSession(payload: object): string {
return jwt.sign(payload, HMAC_SECRET, {
algorithm: 'HS256',
expiresIn: '15m'
});
}
export function verifySession(token: string) {
// Pin algorithms: ['HS256'] to block alg:none and RSA key-confusion attacks
return jwt.verify(token, HMAC_SECRET, { algorithms: ['HS256'] });
}
Symmetric 256-bit HMAC exposes no public key in JWKS to invert, adds only 32 bytes to the token, verifies in sub-microsecond time, and is immune to Shor's algorithm.
Where third-party public keys are required, cap external ID token lifetimes to 15 minutes and exchange them immediately for an internal HS256 session cookie.
Ensure your application containers offer X25519MLKEM768 when acting as TLS clients calling external APIs (LLM providers, Stripe, AWS S3/KMS) or internal microservices.
// Go 1.24+: X25519MLKEM768 is enabled by default unless CurvePreferences is overridden
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS13,
CurvePreferences: []tls.CurveID{tls.X25519MLKEM768, tls.X25519},
}
// Rust: Cargo.toml -> rustls = { version = "0.23", features = ["aws-lc-rs", "prefer-post-quantum"] }
# Node / Python / JVM containers (/etc/ssl/openssl.cnf on OpenSSL 3.5+)
MinProtocol = TLSv1.3
Groups = X25519MLKEM768:X25519:P-256
AES-256 disk volumes and database snapshots require zero re-encryption. Focus on database wire TLS handshakes and eliminating client-side static RSA envelope key wrapping.
ssl = on ssl_min_protocol_version = 'TLSv1.3' ssl_groups = 'X25519MLKEM768:X25519:prime256v1'
WireGuard's Noise_IKpsk2 handshake includes a 256-bit PresharedKey slot specifically designed to add post-quantum resistance on top of Curve25519.
wg genpsk > /etc/wireguard/pq.psk # In /etc/wireguard/wg0.conf under [Peer]: PresharedKey = /etc/wireguard/pq.psk
Protect desktop apps (Tauri, Electron) and CLI self-updaters against real-time signature forgery by requiring both classical Ed25519 and FIPS 204 ML-DSA-65 signatures to pass.
pub fn verify_update_manifest(payload: &[u8], sigs: &Sigs) -> Result<(), Error> {
ED25519_ROOT.verify_strict(payload, &sigs.ed25519)?;
MLDSA65_ROOT.verify(payload, &sigs.mldsa65)?;
Ok(())
}
Use ML-DSA-65 certificates today for internal service-mesh mTLS where you control both trust stores. For public browsers, keep ECDSA leaf certificates paired with X25519MLKEM768 key exchange and 7-day ACME renewal.
openssl req -x509 -new -newkey mldsa65 -keyout internal-ca.key -out internal-ca.crt \ -nodes -subj "/CN=Internal Post-Quantum mTLS CA" -days 365
CLI probes for live TLS and SSH endpoints, followed by repository audit prompts for coding agents.
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
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
Locates every TLS config, SSH client, JWT verifier, and key-wrapping call across your application monorepo.
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].
Audits cloud load balancers, CDN origin hops, ingress controllers, and bastion configs for classical key-exchange gaps.
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.
Migrates internal tokens away from asymmetric public keys and designs composite `Ed25519 + ML-DSA-65` release verification.
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.
Select a primitive family to see what an attacker can do if it breaks, what stays unaffected, and which change mitigates it.
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.
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.
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.
Decrypting old SSH and HTTPS sessions exposes every unrotated credential sent inside them: production DB passwords, .env files, API keys, and customer PII.
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.
Enable X25519MLKEM768 on all ingress/origin TLS and mlkem768x25519-sha256 on OpenSSH, then rotate any long-lived secrets that previously traversed classical channels.
A signature break does not decrypt recorded traffic that used post-quantum key exchange. It lets an attacker compute a private signing key from a published public key and forge signatures on live requests.
The attacker downloads your public key from /.well-known/jwks.json, computes the private key offline, and mints valid RS256/ES256 admin session tokens directly against your API.
The attacker extracts the hardcoded Ed25519 public key from your desktop/CLI binary, derives the private signing key, and signs a malicious update manifest served via DNS/CDN hijack.
The attacker derives your TLS leaf certificate's private key from the public certificate and actively intercepts live connections to impersonate your origin server.
Even if an attacker recovers your classical ECDSA certificate private key tomorrow, they still cannot decrypt yesterday's recorded X25519MLKEM768 TLS session—the certificate key only signed the transcript; it never encrypted the traffic.
Switch internal JWTs from RS256/ES256 to 256-bit HS256 HMAC (no public key exists to invert) and add dual Ed25519 + ML-DSA-65 signatures to software updaters.
Encrypting symmetric keys directly under a long-lived RSA-2048 public key (legacy TLS 1.2 TLS_RSA_* cipher suites or client-side RSA-OAEP database field wrapping) collapses all historical sessions and stored ciphertexts the moment that single RSA public key is inverted.
Each session encrypts its pre-master secret under the server's static RSA key. Recovering that key decrypts every recorded session.
Database rows storing AES-256 Data Encryption Keys wrapped under a public RSA key can be decrypted offline from any leaked backup.
Disable all non-ECDHE TLS 1.2 suites and wrap Data Encryption Keys using symmetric AES-256-GCM inside AWS/GCP KMS or hybrid ML-KEM-768.
Shor's algorithm and lattice/number-theory attacks rely on hidden periodic group structure. Symmetric ciphers (AES-256-GCM) and cryptographic hashes (SHA-256, HMAC-SHA256) have no algebraic group structure to invert.
Unstructured quantum search achieves at most a quadratic speedup and requires 2^128 strictly sequential quantum evaluations—physically infeasible on any timescale.
Quantum collision search is bottlenecked by massive quantum memory (QRAM) and serial depth. NIST confirms SHA-256 and 256-bit HMAC need no post-quantum replacement.
AES-256 databases, S3 buckets, and disk volumes do not need re-encryption. Focus migration work on asymmetric key exchange and signatures.