How to check if a server uses post-quantum TLS (openssl, curl, browser, CI)

On this page
  1. 1. openssl s_client
  2. 2. curl
  3. 3. Browser DevTools
  4. 4. Check your client, not just your server
  5. 5. In CI, failing closed
  6. Language guides

Short answer: Connect with a client that supports the hybrid group and read which group was negotiated. With OpenSSL 3.5+: openssl s_client -connect host:443 -groups X25519MLKEM768, then look for X25519MLKEM768 as the negotiated group. In Chrome or Edge, DevTools → Security shows the key exchange for the page. To keep it from regressing, run the same check in CI and fail the build if the result is missing.

1. openssl s_client

Requires OpenSSL 3.5 or later on the machine you test from (openssl version).

# Offer only the hybrid group: success proves the server supports it
openssl s_client -connect example.com:443 -servername example.com \
  -groups X25519MLKEM768 </dev/null 2>/dev/null | grep -i "group"

# Offer only classical: success proves old clients still connect
openssl s_client -connect example.com:443 -servername example.com \
  -groups X25519 </dev/null 2>/dev/null | grep -i "group"

If the first command fails the handshake, the server doesn't support the hybrid group. If it prints X25519MLKEM768, it does. Run both: a migration that breaks classical clients is worse than no migration.

On macOS the system openssl is LibreSSL; use a Homebrew OpenSSL 3.5+ ($(brew --prefix openssl@3)/bin/openssl).

2. curl

curl built against OpenSSL 3.5+ accepts a group list and, in recent versions, prints the negotiated group in verbose output:

curl -sv --curves X25519MLKEM768 https://example.com -o /dev/null 2>&1 | grep -i "SSL connection"

3. Browser DevTools

Chrome, Edge and Firefox offer X25519MLKEM768 by default. In Chrome or Edge: open DevTools → Security → select the origin. The connection details list the key exchange; X25519MLKEM768 means the page was loaded over hybrid post-quantum TLS. This tests browser-to-edge only, not your origin or internal services.

4. Check your client, not just your server

To test whether your code (a Go service, a Node worker, a Java client) offers the hybrid group, point it at a server that requires or reports it. Cloudflare runs pq.cloudflareresearch.com for this. Or run a local test server that only accepts the hybrid group:

openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes -days 1 \
  -subj "/CN=localhost" -keyout key.pem -out cert.pem
openssl s_server -accept 8443 -cert cert.pem -key key.pem -groups X25519MLKEM768 -www

A client that connects successfully to that server offered X25519MLKEM768. One that fails didn't.

5. In CI, failing closed

A one-off check proves today's state. A CI job keeps it true when someone later pins CurvePreferences or downgrades a base image. The essentials:

A minimal GitHub Actions step for a server you start in the job:

- name: Prove hybrid post-quantum handshake
  run: |
    out=$(openssl s_client -connect localhost:8443 -groups X25519MLKEM768 </dev/null 2>&1 || true)
    echo "$out" | grep -q "X25519MLKEM768" || { echo "::error::hybrid group not negotiated"; exit 1; }

The runner's OpenSSL must be 3.5+. Use a container image that ships it if the runner's doesn't.

This is the check pqshift adds to every migration PR it opens: a "pqshift proof" workflow that builds your code, performs a real hybrid handshake and a classical-fallback handshake, records the negotiated group and the run URL, and fails closed.

Language guides

FAQ

How can I tell if a website uses post-quantum encryption?

In Chrome or Edge open DevTools, Security tab, and look for X25519MLKEM768 in the connection's key exchange. From a terminal with OpenSSL 3.5+: openssl s_client -connect host:443 -groups X25519MLKEM768 and look for the negotiated group.

Why does my test client say X25519 instead of X25519MLKEM768?

Either the server does not support the hybrid group, or your client doesn't: OpenSSL older than 3.5 and Go older than 1.24 can't offer it. Check the client version first.

Sources