Engineering Guide 6 min read · 2026-12-02

How to Enable X25519MLKEM768 on Nginx, Caddy, Cloudflare & OpenSSH

Upgrade your production web servers, reverse proxies, CDNs, and SSH bastions from Grade C to Grade A+ with battle-tested configs and MTU checks.

1. Nginx with OpenSSL 3.5+

OpenSSL 3.5 introduced native ML-KEM support without needing external providers. Verify your Nginx build links against OpenSSL 3.5+ (`nginx -V`) and list X25519MLKEM768 first in `ssl_ecdh_curve` so modern browsers negotiate PQC in 1-RTT without triggering a HelloRetryRequest.

/etc/nginx/conf.d/pqc.conf
ssl_protocols TLSv1.3;
ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1:secp384r1;
ssl_prefer_server_ciphers off;

2. Caddy & Go 1.24+ / 1.26 Services

Any Go binary compiled with Go 1.24 or newer (including modern Caddy builds) enables X25519MLKEM768 automatically when `CurvePreferences` is left unset. Go 1.26 also adds native SecP256r1MLKEM768 (0x11EB) and SecP384r1MLKEM1024 (0x11ED).

Common pitfall: Legacy Caddyfiles or Go configs that manually set `curves x25519` silently disable post-quantum TLS! Remove manual curve overrides unless you explicitly include X25519MLKEM768 first.

3. OpenSSH 9.9 / 10.0+ Bastion Hosts

Web HTTPS is only half the story — SSH sessions carrying deployment keys and database tunnels are equally valuable HNDL targets. OpenSSH 10.0 makes `mlkem768x25519-sha256` the default KEX.

/etc/ssh/sshd_config
KexAlgorithms mlkem768x25519-sha256,[email protected],curve25519-sha256
Ciphers [email protected],[email protected]

4. Watch Out for the 1,216-Byte KeyShare MTU Trap

An X25519MLKEM768 KeyShare is 1,216 bytes (versus 32 bytes for X25519), pushing the TLS ClientHello past a single 1,460-byte TCP MSS segment. Always run an oversized ClientHello probe (built right into amiquantomsafe) to verify legacy firewalls don't silently drop fragmented handshakes.

Test Your Own Domain in 2 Seconds

Run a live X25519MLKEM768, legacy draft, MTU middlebox, and X.509 check now — free, zero signup.

Open Quantum Checker →