Quick answer: nginx can negotiate hybrid ML-KEM when it is built against OpenSSL 3.5+ and the group list includes
X25519MLKEM768. Test the origin, not only the CDN hostname.
nginx can negotiate a hybrid post-quantum key exchange when it is built against OpenSSL 3.5 or later and the TLS 1.3 group list includes X25519MLKEM768. The important part is testing the origin, because a CDN can protect the browser-to-edge hop while the edge-to-origin hop stays classical.
What this guide covers
It covers the TLS key exchange for an nginx server and, where relevant, the origin behind a CDN. It does not cover data at rest, code signing or QKD. A hybrid session does not make the certificate post-quantum.
Check what nginx is linked against
nginx -V 2>&1 | tr ' ' '\n' | grep -E 'openssl|ssl'
ldd "$(command -v nginx)" | grep -E 'ssl|crypto'
openssl version -a
If nginx links OpenSSL older than 3.5, the group name will not be available. Upgrade the library and the nginx package, or terminate TLS on a proxy that has 3.5+.
Configure the group
A tested pattern for nginx on OpenSSL 3.5+:
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1;
ssl_ecdh_curve is the nginx directive that passes the group list to OpenSSL. On builds that expose OpenSSL's configuration command, this is equivalent:
ssl_conf_command Groups X25519MLKEM768:X25519:prime256v1;
Keep a classical fallback. A client that does not support the hybrid group should still connect with X25519 or P-256 unless your policy says otherwise.
Reload and check the syntax:
nginx -t
systemctl reload nginx
Prove the origin negotiated it
From an OpenSSL 3.5+ client:
openssl s_client \
-connect origin.example.com:443 \
-servername origin.example.com \
-tls1_3 \
-groups X25519MLKEM768 \
</dev/null 2>/dev/null | grep -i "Negotiated TLS1.3 group"
Expected:
Negotiated TLS1.3 group: X25519MLKEM768
If you test the public hostname and it resolves to a CDN, you have tested the edge, not the origin. Test the origin hostname or IP directly where your network allows it.
Verify with Ready for Quantum
| Check | What it answers |
|---|---|
quantum | Did this connection negotiate a PQ key exchange? |
quantumcert | Does the certificate have the tested PQ property? |
https | Is the certificate trusted and current? |
| OpenSSL via the Security expert | Which protocol, cipher and group were used? |
Add the host with the endpoint that matches the question. Use an agent that can reach the origin. For a CDN-fronted site, add both the public hostname and the origin (if reachable) so the two hops are separate results.
Read the result
Say: “The origin negotiated X25519MLKEM768 from the EU agent.” Do not say: “The site is quantum-safe.” The check covers one connection from one agent. It does not prove that every edge, client or backend is configured the same way.
A classical result means the tested connection did not negotiate the group. Check the linked OpenSSL, the directive, the CDN path and whether the client offered the group.
Version matrix
| nginx / OpenSSL | Hybrid group | Action |
|---|---|---|
| nginx built with OpenSSL 3.5+ | Available | Set the group list |
| nginx with an older OpenSSL | Not available | Upgrade the build |
| CDN in front of nginx | Edge may differ | Test the origin separately |
Failure example
The CDN test shows post-quantum, but the origin test stays classical. The CDN terminates TLS and nginx links OpenSSL 3.0. Testing the origin directly exposes the older library; upgrading nginx or its OpenSSL fixes the hop the CDN does not cover.
Automate it
- A Command Processor can collect
nginx -V, the linked OpenSSL, the effectivessl_ecdh_curve/ssl_conf_commandlines and certificate paths. - An AgentFlow can inventory the host, add the quantum and certificate checks, run both and render a report.
- A Connect can run the
quantumcheck on a schedule and alert when the group regresses. - Alerts on
httpsexpiry cover the certificate; they do not prove the key exchange.
What can go wrong
- nginx is linked to an older OpenSSL even though the shell has 3.5.
- The CDN terminates TLS and the origin is never tested.
ssl_ecdh_curveis set to a list that omits the hybrid group.- A client pins a classical group and the server has no fallback.
- The certificate is classical while the session is hybrid; that is expected.
Rollback
Keep the previous ssl_protocols and group configuration. On failure, restore the old file, run nginx -t, reload, and verify the previous group is back.
Limits
- One target, one port and one agent per check.
- The agent's library set matters.
- Key exchange and certificate signatures are separate.
- No data-at-rest or QKD coverage.
- A clean check is not proof that every virtual host or backend is configured correctly.