Enable post-quantum TLS (X25519MLKEM768) on nginx
How to offer the hybrid post-quantum key exchange X25519MLKEM768 on nginx, from the vendor's documentation, checked on December 4, 2026.
Steps
- Check the requirements: nginx built with OpenSSL 3.5+ (check with nginx -V).
- Apply the configuration below.
- Reload the service and check it again on checkmypqc.com.
Recommended now: post-quantum first, classical kept
ssl_protocols TLSv1.2 TLSv1.3;
# OpenSSL 3.5+ already prefers X25519MLKEM768 when ssl_ecdh_curve is not set.
# To set it explicitly, keep the "/": it makes the server ask for the hybrid
# even from clients that sent only an X25519 key share.
ssl_ecdh_curve X25519MLKEM768/X25519:prime256v1:secp384r1;
With a plain list (X25519MLKEM768:X25519), a client that sends only an X25519 key share gets X25519, even with ssl_prefer_server_ciphers on. The "/" groups X25519MLKEM768 alone first, so the server asks for it. We test this exact configuration in our lab. Older hardening snippets such as ssl_ecdh_curve X25519:prime256v1 turn post-quantum off.
Later: require post-quantum
ssl_protocols TLSv1.3;
ssl_ecdh_curve X25519MLKEM768:SecP256r1MLKEM768:SecP384r1MLKEM1024;
Findings
- HighNo post-quantum key exchange
CMP-TLS-KX-CLASSICAL - HighTLS 1.3 is not enabled
CMP-TLS-NO-TLS13 - HighOnly a pre-standard post-quantum group
CMP-TLS-KX-DRAFT-ONLY - HighBrowsers get classical key exchange
CMP-TLS-KX-NOT-PREFERRED - MediumCurrent browsers are refused
CMP-TLS-KX-BROWSER-REFUSED - LowA draft group is still accepted
CMP-TLS-KX-DRAFT-ENABLED - LowTLS 1.2 is still accepted
CMP-TLS-TLS12-ACCEPTED