checkmypqc.com

Home › Fix guides › Enable post-quantum TLS (X25519MLKEM768) on nginx

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

  1. Check the requirements: nginx built with OpenSSL 3.5+ (check with nginx -V).
  2. Apply the configuration below.
  3. Reload the service and check it again on checkmypqc.com.

Recommended now: post-quantum first, classical kept

nginx.conf (http or server block)

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

This refuses every client without TLS 1.3 and X25519MLKEM768: older browsers, operating systems, libraries and devices. Check your logs before you switch.

nginx.conf

ssl_protocols TLSv1.3;
ssl_ecdh_curve X25519MLKEM768:SecP256r1MLKEM768:SecP384r1MLKEM1024;

Vendor documentation: https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ecdh_curve · checked December 4, 2026

Findings

After any change, check the service again. A change that never reaches the server (a load balancer or CDN in front, a configuration file that is not loaded) is the most common reason a fix does not show.

Updated December 4, 2026 · Open the interactive version

Related

Check your site

Free, no account: see in seconds whether browsers get post-quantum key exchange with your website or SSH server.

Check a service

Ask your AI assistant: checkmypqc.com runs a public MCP server at https://checkmypqc.com/mcp.