Quantum-secure OpenSSL: hybrid TLS that actually negotiates

Enable hybrid ML-KEM key exchange on OpenSSL 3.5+, prove the negotiated group, and separate the session from the certificate.

Quick answer: OpenSSL 3.5+ can negotiate X25519MLKEM768 when the service links the newer library. Check the linked library, put the hybrid group first, and verify the negotiated group with openssl s_client or the quantum check.

If your service links against OpenSSL 3.5 or later, it can negotiate a hybrid post-quantum key exchange without a patched provider. This guide shows how to confirm the library, enable the hybrid group, prove the negotiated group, and keep the certificate question separate.

What this guide covers

It covers the TLS 1.3 key exchange for a service that uses OpenSSL. It does not cover data at rest, code signing, firmware validation or QKD. A successful key-exchange check does not make the certificate post-quantum, and it does not make the whole system “quantum-safe”.

What changed in OpenSSL

OpenSSL 3.5 added built-in ML-KEM support and hybrid TLS groups. The common hybrid group is X25519MLKEM768, which combines X25519 with ML-KEM-768. Your build may also expose SecP256r1MLKEM768 and other combinations.

A hybrid group protects the session secret with both a classical and a post-quantum algorithm. If one is broken, the other still protects the connection. That is why hybrid is the practical first step: it does not require the certificate or every client to move at once.

The certificate is a separate property. A server can negotiate a hybrid key exchange while presenting a classical RSA or ECDSA certificate. Do not describe that as a post-quantum certificate.

Find the OpenSSL your service uses

Do not check only the system openssl binary. A service may link a different library, a container may bundle its own, and a reverse proxy may terminate TLS before your application sees it.

openssl version -a
ldd "$(command -v nginx)" | grep -E 'ssl|crypto'
nginx -V 2>&1 | tr ' ' '\n' | grep -E 'openssl|ssl'

For Apache:

apachectl -V 2>&1 | grep -i ssl
ldd "$(command -v apache2)" | grep -E 'ssl|crypto'

If the linked library is older than 3.5, changing a group list will not add ML-KEM. Upgrade the library and the service package, or terminate TLS on a proxy that has 3.5+.

Enable the hybrid group

The exact directive depends on the service. The goal is the same: put X25519MLKEM768 first and keep a classical fallback.

For nginx on OpenSSL 3.5+:

ssl_protocols TLSv1.2 TLSv1.3;
ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1;

If your nginx build exposes OpenSSL's configuration command, this is equivalent:

ssl_conf_command Groups X25519MLKEM768:X25519:prime256v1;

For Apache httpd:

SSLProtocol -all +TLSv1.2 +TLSv1.3
SSLOpenSSLConfCmd Groups X25519MLKEM768:X25519:prime256v1

Keep TLS 1.2 if you still have clients that need it. Removing it is a separate compatibility decision; it is not required to test the hybrid group.

Verify the negotiated group

From a client with OpenSSL 3.5 or later:

openssl s_client \
  -connect example.com:443 \
  -servername example.com \
  -tls1_3 \
  -groups X25519MLKEM768 \
  </dev/null 2>/dev/null | grep -i "Negotiated TLS1.3 group"

A successful result includes:

Negotiated TLS1.3 group: X25519MLKEM768

If the line is missing or the handshake fails, the client or the server did not accept the group. Check the linked library, the directive and whether a CDN or load balancer terminates TLS before the origin.

Verify with Ready for Quantum

The command line is a point-in-time check from one machine. For recurring evidence, add the service as a host and use two properties:

CheckQuestionWhat it proves
quantumDid the tested connection negotiate a PQ key exchange?The session, from the selected agent
quantumcertDoes the certificate have the tested PQ property?The certificate, not the session
httpsIs the certificate trusted and current?Trust and expiry
OpenSSL via the Security expertWhich protocol, cipher and group were used?The connection detail

Choose an agent that can reach the service. A public hostname may resolve to a CDN; the origin may be a different hop. Test both where possible.

Read the result honestly

Say: “The tested connection negotiated X25519MLKEM768 from the EU agent on 4 December 2026.” Do not say: “The service is quantum-safe.” The first claim is evidence. The second is a conclusion the check cannot support.

A classical result is not proof that the server cannot support PQ. It means the tested client and server did not negotiate it. The agent's library set, the server configuration and the path all matter.

Version matrix

OpenSSLHybrid groupAction
3.5+AvailablePut X25519MLKEM768 first
3.0–3.4Not availableUpgrade the library or terminate elsewhere
3.5+ with a custom group listOnly if listedAdd the hybrid group

Failure example

A service links OpenSSL 3.0 even though the shell has 3.5. The group is rejected and the connection stays classical. ldd shows the older libssl; upgrading the service package or moving TLS termination to a 3.5+ proxy fixes the tested hop.

Automate the inventory and the regression

A one-off check tells you where you are. The useful long-term control is a recurring one.

  • Use a Command Processor to collect the linked OpenSSL version, enabled protocols, group list and certificate paths on each host.
  • Use an AgentFlow to inventory, add the checks, run both quantum properties and render a report.
  • Use a Connect for the recurring quantum check and alert when the negotiated group regresses.
  • Use measurement limits and alerts for certificate expiry; do not treat a failed TLS check as a physical measurement.

What can go wrong

  • The service links an older OpenSSL than the shell. Check with ldd, not openssl version alone.
  • The CDN terminates TLS and the origin never sees the hybrid group.
  • The directive is accepted but the group name is not in the linked library.
  • A client pins a classical group and the server has no fallback.
  • The certificate is classical even though the session is hybrid. That is expected; they are separate.

Rollback

Keep the previous group list and protocol configuration. If a client fails after the change, restore the prior directive, reload the service and confirm the old group is back. Do not leave a half-applied configuration across a fleet.

Limits

  • One target, one port and one agent per check.
  • The result depends on the agent's algorithm set.
  • Key exchange and certificate signatures are separate.
  • No data-at-rest, code-signing or QKD coverage.
  • A classical result is not proof of incapability.

Next

Common questions

How do I know my service supports hybrid ML-KEM?

Check the library the service actually links, not only the shell binary. Use ldd, the process maps or the container's OpenSSL, then run openssl s_client with -groups X25519MLKEM768. If the handshake names that group, the tested client and server negotiated it.

Does a hybrid key exchange make the certificate post-quantum?

No. The key exchange protects the session secret; the certificate signature proves identity. A service can negotiate a hybrid key exchange while presenting a classical RSA or ECDSA certificate. Test the certificate property separately with quantumcert or OpenSSL.

What happens if the client does not support X25519MLKEM768?

The connection can fall back to a classical group such as X25519 or P-256 if the server still offers it. That is why you keep a fallback during migration. If the client and server share no group, the handshake fails; check both ends before changing production.

Keep exploring

Quantum-secure nginx: prove the origin negotiates hybrid TLS

Configure nginx against OpenSSL 3.5+, prefer X25519MLKEM768, and test the origin rather than only the CDN.

Quantum-secure Apache httpd: SSLOpenSSLConfCmd Groups

Set the hybrid group list on Apache, keep a classical fallback, and verify the negotiated group from a chosen agent.

Find the OpenSSL your services actually use

Inventory the OpenSSL version, providers and linked services before changing a TLS setting that may not apply.

Browse the library · Quantum readiness docs · Check a system