Post-quantum TLS readiness
Enable hybrid PQC on Cloudflare
Visitor-to-edge TLS already offers X25519MLKEM768. The hop you may still need to enable is Cloudflare-to-origin, which uses Automatic key exchange (on by default) and prefers hybrid when the origin supports it.
Minimum versions
No Cloudflare plan upgrade is required for Automatic key exchange (available on all plans). The origin must speak TLS 1.3 and support X25519MLKEM768 for that hop to be hybrid. The zone’s encryption mode must be Full, Full (strict), or Strict (SSL-Only Origin Pull). Cloudflare Tunnel is a separate path and already uses X25519MLKEM768 to Cloudflare.
Configuration
Cloudflare dashboard (SSL/TLS → Overview)
# There is no origin-server config file in Cloudflare itself.
# Visitor → Cloudflare edge:
# Already negotiates X25519MLKEM768 with clients that offer it.
#
# Cloudflare → your origin:
# Automatic key exchange is on for existing and new zones by default.
# When the origin supports both classical and post-quantum groups,
# Cloudflare prefers X25519MLKEM768.
#
# Dashboard: SSL/TLS → Overview → "Origin connection & post-quantum encryption"
# - Leave Automatic key exchange On (default).
# - Leave Compliance requirements unset unless you intend to *require*
# hybrid PQ (that setting will 525 origins that cannot do it).
#
# Then enable X25519MLKEM768 on the origin itself (see /fix/nginx/,
# /fix/caddy/, /fix/haproxy/, /fix/openssl/, and the other guides).
How to verify
openssl s_client -tls1_3 -groups X25519MLKEM768 -connect HOST:443 </dev/null 2>&1 | grep -E "Negotiated TLS1.3 group|Server Temp Key|handshake failure"
# Expect: Negotiated TLS1.3 group: X25519MLKEM768
# Needs OpenSSL 3.5+ on the machine running the command (otherwise a failure is a false negative).
# Or: pqcscan HOST
Notes
- Do not use the older Origin Post-Quantum Encryption API to change this: Cloudflare’s current docs say requests to that API are no-ops. Use Automatic key exchange and, if you have a compliance need, the compliance requirement setting documented on the same page.
- A ‘Post-quantum hybrid’ compliance requirement advertises only X25519MLKEM768 and returns HTTP 525 when the destination does not support it, including Workers `fetch()` from that zone. Keep the default (no compliance requirement) unless you are ready for that.
- Split ClientHellos (hybrid key shares are larger) can trip ossified middleboxes. Test against the origin before requiring hybrid.
- This does not rotate origin certificates. Post-quantum signatures (ML-DSA) for Authenticated Origin Pulls and Custom Origin Trust Store are a separate, later step documented by Cloudflare.
Fix with your agent
Paste this into Cursor, Claude Code or Codex in the repo that terminates TLS. Review the PR, and test in staging first. The packaged skill is not published yet.
You are fixing TLS key exchange for post-quantum readiness (hybrid X25519MLKEM768).
1. If I have a pqc-report.json, read it. Otherwise run:
openssl s_client -tls1_3 -groups X25519MLKEM768 -connect HOST:443 </dev/null
(needs OpenSSL 3.5+; a handshake failure means the server does not offer hybrid).
2. Find TLS config in this repo: nginx (ssl_ecdh_curve), Caddy (tls { curves }), HAProxy (ssl-default-bind-curves),
Node (ecdhCurve), Go (tls.Config.CurvePreferences), Dockerfile base images.
3. Enable X25519MLKEM768 FIRST with classic fallback (X25519, secp256r1). Never remove the fallback.
4. Flag anything pinned to OpenSSL < 3.5, Go < 1.24 or an old Node, and propose a version bump. Do not bump silently.
5. If TLS terminates at Cloudflare or an AWS ALB/CloudFront, tell me to change that service's TLS policy instead of editing origin config.
6. Grep for RSA/ECDH/ECDSA usage in code and add `// TODO(crypto-agility)` comments only. Do not change certificates or key types.
7. Open a PR that explains each change, how to verify it, and how to roll back.
Sources
- Cloudflare docs: PQC in Cloudflare products (visitor and origin status)
- Cloudflare docs: post-quantum between Cloudflare and origin servers
- Cloudflare docs: Automatic key exchange to origins
Reviewed 4 Dec 2026 against the official pages linked above. If a vendor page has since changed, follow the vendor page. Other stacks: nginx · Caddy · HAProxy · Node.js · Go · OpenSSL · AWS Application Load Balancer · Java (JDK)