Skip to content
Quantum Aether/Post-quantum TLS in Java: X25519MLKEM768 in JDK 27 (JEP 527) · Quantum Aether
Live platformالعربية

Post-quantum TLS in Java: X25519MLKEM768 in JDK 27 (JEP 527)

Updated:

Short answer

Java supports post-quantum TLS from JDK 27 (JEP 527). X25519MLKEM768 is on by default for TLS 1.3, so apps using javax.net.ssl, HttpClient or embedded Tomcat and Jetty negotiate it with no code change. JDK 21 and JDK 25 LTS do not include it; on those, terminate TLS in front of the JVM with nginx on OpenSSL 3.5, a PQ-enabled load balancer or a CDN.

Scan your site now, free

Domain or HTTP(S) URL. HTTPS port 443 is checked; paths and pasted URL ports are not scanned.

JEP 527 brings hybrid post-quantum key exchange to Java's built-in TLS (SunJSSE) in JDK 27, released in September 2026. It adds three hybrid groups, X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024, and enables X25519MLKEM768 by default next to the classical groups.

What you get without code changes

Applications using the standard javax.net.ssl APIs (embedded Tomcat, Jetty or Undertow on JSSE, java.net.http.HttpClient, HttpsURLConnection) negotiate X25519MLKEM768 on JDK 27 automatically, as long as they do not override the named groups. As a client, JDK 27 sends two key shares: one X25519MLKEM768 and one x25519.

Check for overrides

Look for the system property jdk.tls.namedGroups (in start scripts, JAVA_TOOL_OPTIONS or container env) and for SSLParameters.setNamedGroups(...) in code. A list without the hybrid group turns it off. If you set it, put the hybrid group first:

-Djdk.tls.namedGroups=X25519MLKEM768,x25519,secp256r1,secp384r1

On JDK 21 or JDK 25 (LTS)

These releases have no hybrid ML-KEM key exchange in SunJSSE. JDK 27 is a short-term release, so many teams will stay on an LTS. The practical route is to terminate TLS in front of the JVM on a component that supports it: nginx with OpenSSL 3.5, a PQ-enabled AWS load balancer or a CDN (see nginx and AWS).

Verify

java -version
openssl s_client -connect example.com:443 -groups X25519MLKEM768 </dev/null 2>/dev/null | grep -i group

Or run the free scan; grade A means TLS 1.3 with a hybrid post-quantum key exchange.

Sources: OpenJDK JEP 527 and the Inside Java article "Post-Quantum Hybrid Key Exchange for TLS 1.3" (2026-02-17). Checked 2026-11-09.

Frequently asked questions

How do I enable X25519MLKEM768 in Java?

On JDK 27 you don't need to: it is enabled by default. If your start scripts set jdk.tls.namedGroups, put it first: -Djdk.tls.namedGroups=X25519MLKEM768,x25519,secp256r1,secp384r1.

Why does my JDK 27 app still negotiate x25519?

Something overrides the named groups: jdk.tls.namedGroups in a start script, JAVA_TOOL_OPTIONS or a container variable, or SSLParameters.setNamedGroups(...) in code. A proxy or load balancer that terminates TLS in front of the JVM also decides instead of Java.

Which hybrid groups does JDK 27 support?

X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024, the three groups of RFC 10024. Only X25519MLKEM768 is enabled by default. As a client, JDK 27 sends two key shares: X25519MLKEM768 and x25519.

Does JDK 21 or JDK 25 support post-quantum TLS?

No. Their SunJSSE has no hybrid ML-KEM key exchange (checked November 2026). Until a release adds it, put a PQ-capable TLS terminator in front of the JVM.

How do I verify a Java server negotiates X25519MLKEM768?

Check the runtime with java -version, then run openssl s_client -connect example.com:443 -groups X25519MLKEM768 </dev/null 2>/dev/null | grep -i group from an OpenSSL 3.5 client, or use the free scan.

Scan your site now, free

Domain or HTTP(S) URL. HTTPS port 443 is checked; paths and pasted URL ports are not scanned.