Post-quantum TLS readiness
Enable hybrid PQC on Java (JDK)
JDK 27 implements hybrid TLS 1.3 key exchange (JEP 527) and puts X25519MLKEM768 first in the default named-group list. Existing javax.net.ssl code benefits without changes, as long as it does not already pin groups.
Minimum versions
JDK 27 (JEP 527, delivered). The Java Security Standard Algorithm Names list includes X25519MLKEM768, SecP256r1MLKEM768, and SecP384r1MLKEM1024. Only the first of those is enabled by default.
Configuration
SSLParameters or jdk.tls.namedGroups
// Default on JDK 27 (no code change needed):
// X25519MLKEM768, x25519, secp256r1, secp384r1, secp521r1, x448,
// ffdhe2048, ffdhe3072, ffdhe4096
// If you already pin named groups, include the hybrid group and keep
// classical fallbacks:
SSLParameters params = socket.getSSLParameters();
params.setNamedGroups(new String[] {
"X25519MLKEM768", "x25519", "secp256r1"
});
socket.setSSLParameters(params);
# Or JVM-wide (colon-separated on some releases; check the JDK 27
# security-property docs for the exact separator if you use this):
# java -Djdk.tls.namedGroups=X25519MLKEM768,x25519,secp256r1 ...
How to verify
openssl s_client -tls1_3 -groups X25519MLKEM768 -connect HOST:443 </dev/null 2>&1 | grep -E "Negotiated TLS1.3 group|Server Temp Key|handshake failure"
# Expect: Negotiated TLS1.3 group: X25519MLKEM768
# Needs OpenSSL 3.5+ on the machine running the command (otherwise a failure is a false negative).
# Or: pqcscan HOST
Notes
- JEP 527 is explicit that applications using javax.net.ssl benefit by default with no code change, unless they already select specific key exchange schemes.
- SecP256r1MLKEM768 and SecP384r1MLKEM1024 are implemented but not enabled by default. Only add them if you have a documented need.
- Older JDKs (26 and below) do not include this TLS hybrid support. Do not claim a backport unless you have verified one in a vendor’s notes.
- This does not change certificate key types (RSA/ECDSA). Signature migration is a later step.
Fix with your agent
Paste this into Cursor, Claude Code or Codex in the repo that terminates TLS. Review the PR, and test in staging first. The packaged skill is not published yet.
You are fixing TLS key exchange for post-quantum readiness (hybrid X25519MLKEM768).
1. If I have a pqc-report.json, read it. Otherwise run:
openssl s_client -tls1_3 -groups X25519MLKEM768 -connect HOST:443 </dev/null
(needs OpenSSL 3.5+; a handshake failure means the server does not offer hybrid).
2. Find TLS config in this repo: nginx (ssl_ecdh_curve), Caddy (tls { curves }), HAProxy (ssl-default-bind-curves),
Node (ecdhCurve), Go (tls.Config.CurvePreferences), Dockerfile base images.
3. Enable X25519MLKEM768 FIRST with classic fallback (X25519, secp256r1). Never remove the fallback.
4. Flag anything pinned to OpenSSL < 3.5, Go < 1.24 or an old Node, and propose a version bump. Do not bump silently.
5. If TLS terminates at Cloudflare or an AWS ALB/CloudFront, tell me to change that service's TLS policy instead of editing origin config.
6. Grep for RSA/ECDH/ECDSA usage in code and add `// TODO(crypto-agility)` comments only. Do not change certificates or key types.
7. Open a PR that explains each change, how to verify it, and how to roll back.
Sources
- JEP 527: Post-Quantum Hybrid Key Exchange for TLS 1.3 (JDK 27)
- Java Security Standard Algorithm Names (Named Groups)
Reviewed 4 Dec 2026 against the official pages linked above. If a vendor page has since changed, follow the vendor page. Other stacks: nginx · Caddy · HAProxy · Node.js · Go · OpenSSL · Cloudflare · AWS Application Load Balancer