Skip to content
Post-quantumsecp256r1mlkem768

SecP256r1MLKEM768

The hybrid TLS 1.3 key exchange combining NIST P-256 ECDH with ML-KEM-768 (IANA group 0x11EB), preferred where every component must be FIPS-approved.

Why it's safe

Like X25519MLKEM768, it remains secure if either component holds. It is typically chosen for FIPS-validated environments because both P-256 and ML-KEM are NIST-approved. A sibling group, SecP384r1MLKEM1024, offers a higher security level.

Used for
Key exchange
Family
Hybrid (elliptic curve + lattice)
Classical security
128 bits
Against a quantum computer
~192 bits
Standards
RFC 10024, FIPS 203, NIST SP 800-56A Rev. 3
Read the guideHybrid cryptography: belt and braces

Migration guides

How to adopt SecP256r1MLKEM768. Pick your stack.

OpenSSL 3.5+ (libssl) · cC/C++ with OpenSSL 3.5+: hybrid post-quantum TLS groups, no oqs-provider neededProduction-ready

Why

OpenSSL 3.5 (April 2025, a long-term-support release) added native ML-KEM, ML-DSA and SLH-DSA plus the hybrid TLS groups X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024. Its default group list prefers the hybrid and its default client key shares are X25519MLKEM768 and X25519:

?*X25519MLKEM768 / ?*X25519:?secp256r1 / ?X448:?secp384r1:?secp521r1 / ?ffdhe2048:?ffdhe3072

So any program linked against OpenSSL 3.5+ that does not override the groups is already post-quantum for key exchange. You no longer need the Open Quantum Safe oqs-provider for ML-KEM in TLS; remove it unless you need non-NIST algorithms, and note that its pre-standard Kyber group code points are obsolete.

Steps

  1. Check the library your binary actually loads: openssl version -a, ldd ./app | grep -E 'ssl|crypto', or OpenSSL_version(OPENSSL_VERSION) at runtime.
  2. Search the code for SSL_CTX_set1_groups_list, SSL_CTX_set1_curves_list, SSL_set1_groups*, SSL_CTX_set_ecdh_auto, and config files with Groups = / Curves =.
  3. Either remove the override or put the hybrid first. OpenSSL 3.5's syntax also lets you extend the defaults with DEFAULT.
  4. Keep TLS 1.3 enabled (SSL_CTX_set_max_proto_version(ctx, 0) or TLS1_3_VERSION).

Before

c
SSL_CTX *ctx = SSL_CTX_new(TLS_server_method());
SSL_CTX_set1_groups_list(ctx, "P-256:P-384");          /* classical only */
SSL_CTX_set_max_proto_version(ctx, TLS1_2_VERSION);    /* no TLS 1.3 = no hybrid */

After

c
SSL_CTX *ctx = SSL_CTX_new(TLS_server_method());
SSL_CTX_set_min_proto_version(ctx, TLS1_2_VERSION);
/* Option A: don't call set1_groups at all (OpenSSL 3.5+ defaults prefer X25519MLKEM768). */
/* Option B: explicit list, hybrid first. */
if (SSL_CTX_set1_groups_list(ctx, "X25519MLKEM768:X25519:SecP256r1MLKEM768:P-256:P-384") != 1) {
    /* Fails on OpenSSL < 3.5, which doesn't know the hybrid names. */
    ERR_print_errors_fp(stderr);
}

System-wide, in openssl.cnf:

ini
openssl_conf = openssl_init

[openssl_init]
ssl_conf = ssl_sect

[ssl_sect]
system_default = system_default_sect

[system_default_sect]
Groups = X25519MLKEM768:X25519:SecP256r1MLKEM768:P-256:P-384

Gotchas

  • ClientHello size and middleboxes. The hybrid key share makes the ClientHello larger than one typical TCP segment. The OpenSSL manual notes rare failures or timeouts from firewall software; it suggests prepending ?X25519MLKEM768: without a * so the hybrid is offered only after a HelloRetryRequest, if a specific client population has this problem.
  • Distribution OpenSSL versions. Many LTS distributions still ship OpenSSL 3.0 or 3.2; statically linking or vendoring 3.5+ may be necessary.
  • FIPS provider. Whether ML-KEM is available inside a FIPS-validated provider depends on the validated module version you deploy.
  • Pure ML-KEM groups (MLKEM768, MLKEM1024) also exist; use them only if policy requires non-hybrid (for example CNSA 2.0 profiles use ML-KEM-1024).

Verify

bash
echo | openssl s_client -connect localhost:443 2>/dev/null | grep "Negotiated TLS1.3 group"
# Negotiated TLS1.3 group: X25519MLKEM768
openssl list -tls-groups    # shows which groups your OpenSSL knows (3.5+)
Go crypto/tls · goGo: hybrid post-quantum TLS is on by default since Go 1.24, unless CurvePreferences turns it offProduction-ready

Why

Go's crypto/tls enables the hybrid X25519MLKEM768 key exchange by default since Go 1.24 (when Config.CurvePreferences is nil). Go 1.26 additionally enabled SecP256r1MLKEM768 and SecP384r1MLKEM1024 by default. Go 1.27 added opt-in pure MLKEM1024. That covers clients and servers, and everything built on crypto/tls: net/http, gRPC-Go, Caddy, Traefik and many more.

The most common reason a Go service is not post-quantum is an explicit CurvePreferences list copied from an old hardening guide: any non-nil list replaces the defaults, and if it does not name a hybrid, the hybrid is gone.

Steps

  1. Build with Go 1.24 or later (go version; also check the go/toolchain lines in go.mod and your CI/Docker images).
  2. Search for CurvePreferences and GODEBUG=tlsmlkem=0 / tlssecpmlkem=0 (in code, go.mod godebug lines, //go:debug directives, environment variables).
  3. Prefer deleting CurvePreferences. If policy requires an explicit list, include the hybrids.
  4. Make sure TLS 1.3 is allowed (MaxVersion unset or tls.VersionTLS13).

Before

go
cfg := &tls.Config{
	MinVersion:       tls.VersionTLS12,
	CurvePreferences: []tls.CurveID{tls.CurveP256, tls.X25519}, // replaces the defaults: no post-quantum
}

After

go
// Option A (recommended): leave CurvePreferences nil and get Go's defaults,
// which include X25519MLKEM768 (Go 1.24+) and the P-256/P-384 hybrids (Go 1.26+).
cfg := &tls.Config{MinVersion: tls.VersionTLS12}

// Option B: an explicit list must name the hybrids.
cfg = &tls.Config{
	MinVersion: tls.VersionTLS12,
	CurvePreferences: []tls.CurveID{
		tls.X25519MLKEM768,
		tls.SecP256r1MLKEM768, // Go 1.26+
		tls.X25519,
		tls.CurveP256,
	},
}

Since Go 1.24 the order of CurvePreferences is ignored (crypto/tls picks the order itself); only membership matters.

Gotchas

  • GODEBUG switches. tlsmlkem=0 removes X25519MLKEM768 from the default set and tlssecpmlkem=0 removes the P-256/P-384 hybrids. They exist as escape hatches for broken peers; check you have not inherited them. (Since Go 1.27 they no longer override an explicit CurvePreferences.)
  • Large ClientHello. Clients now send a ~1.2 KB key share. Go 1.24's release notes mention servers that mishandle large records and time out; if a specific peer breaks, fix the peer or scope the workaround to that one client config.
  • FIPS 140-3 mode (GOFIPS140): prefer SecP256r1MLKEM768 where every component must be approved.
  • Certificates are unaffected: hybrid key exchange works with your existing RSA/ECDSA certificates.
  • Reverse proxies in front of Go services decide the client-facing handshake.

Verify

go
conn, err := tls.Dial("tcp", "example.com:443", &tls.Config{})
if err != nil { log.Fatal(err) }
state := conn.ConnectionState()
fmt.Println(state.CurveID) // X25519MLKEM768 (ConnectionState.CurveID was added in Go 1.25)

Or from a shell: echo | openssl s_client -connect host:443 2>/dev/null | grep "Negotiated TLS1.3 group", or npx -y pqe-cli check host.

JSSE (SunJSSE), JDK 27+ · javaJava: hybrid post-quantum TLS in JSSE (JEP 527, JDK 27+)Production-ready

Why

JEP 527 added the hybrid TLS 1.3 groups X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024 to the SunJSSE provider in JDK 27 (released September 2026). X25519MLKEM768 is placed first in the default named-groups list, and clients send two key shares by default (X25519MLKEM768 and x25519). Applications using javax.net.ssl (HttpClient, HttpsURLConnection, Tomcat/Jetty/Netty on JSSE) get it without code changes.

JDK 21 and JDK 25 (the current LTS releases) do not include these groups in SunJSSE; OpenJDK maintainers said new features like this go into a feature release first, so check your vendor's release notes rather than assuming a backport.

Steps

  1. Pick a route:
    • Upgrade the services that terminate or originate TLS to JDK 27+, or wait for an LTS release that includes JEP 527.
    • Terminate TLS in front of Java (nginx/Envoy/cloud load balancer with OpenSSL 3.5+, BoringSSL or AWS-LC) and keep the JVM on an LTS.
    • Use a different TLS provider that supports the hybrids (for example a native OpenSSL-based engine such as netty-tcnative built against a PQ-capable library). Check that provider's documentation for current support.
  2. Remove any jdk.tls.namedGroups setting that lists only classical groups, or add the hybrid first.
  3. Make sure TLS 1.3 is enabled (jdk.tls.client.protocols, SSLParameters.setProtocols).

Before

bash
# Classical-only list: disables post-quantum even on JDK 27+
java -Djdk.tls.namedGroups="secp256r1,x25519" -jar app.jar

After

bash
# JDK 27+: simplest is to remove the property and use the defaults.
java -jar app.jar

# Or list the hybrid explicitly, first:
java -Djdk.tls.namedGroups="X25519MLKEM768,x25519,secp256r1,secp384r1" -jar app.jar

Per connection, SSLParameters.setNamedGroups(...) (JDK 20+) can set the same list programmatically.

Gotchas

  • ClientHello size grows by about 1.2 KB; middleboxes that mishandle multi-packet ClientHellos may break. Test through the real path.
  • FIPS deployments usually prefer SecP256r1MLKEM768.
  • Third-party providers (Bouncy Castle JSSE, Conscrypt, Amazon Corretto Crypto Provider) have their own support timelines; verify, don't assume.
  • Certificates keep working: this only changes key exchange.

Verify

bash
echo | openssl s_client -connect your-java-service:443 2>/dev/null | grep "Negotiated TLS1.3 group"
# Negotiated TLS1.3 group: X25519MLKEM768
# JSSE debug logging also shows the negotiated group:
java -Djavax.net.debug=ssl:handshake -jar app.jar
nginx (with OpenSSL 3.5+) · confignginx: enable hybrid post-quantum TLS (X25519MLKEM768)Production-ready

Why

nginx delegates key exchange to the TLS library it is built with. Built against OpenSSL 3.5+ (or BoringSSL / AWS-LC), nginx negotiates X25519MLKEM768 with modern browsers out of the box, because ssl_ecdh_curve defaults to auto, which uses the library's default list. The usual blockers are an old OpenSSL and an ssl_ecdh_curve line copied from an old hardening guide.

Steps

  1. Find the library nginx uses: nginx -V 2>&1 | grep -i "built with" (look for OpenSSL 3.5 or later; "running with" may also be printed if it differs).
  2. If it is older, install an nginx build linked to OpenSSL 3.5+ (newer distro release, official nginx packages on a newer base, or a container image), or build with --with-openssl=/path/to/openssl-3.5.x.
  3. Remove or fix ssl_ecdh_curve.
  4. Ensure ssl_protocols includes TLSv1.3.
  5. Reload: nginx -t && nginx -s reload.

Before

nginx
ssl_protocols TLSv1.2;
ssl_ecdh_curve secp384r1:prime256v1;

After

nginx
ssl_protocols TLSv1.2 TLSv1.3;
# Either delete ssl_ecdh_curve (default "auto" = OpenSSL 3.5+ defaults, hybrid preferred) or:
ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1:secp384r1;

Gotchas

  • Unknown group name: with an OpenSSL older than 3.5, nginx -t fails on X25519MLKEM768. That is a useful check.
  • Upstream (proxy_pass) connections are separate: nginx acting as a client uses proxy_ssl_conf_command Groups ... (nginx 1.19.4+) if you need to set groups for upstream TLS.
  • Stream module (stream { ... }) has its own ssl_ecdh_curve.
  • Middleboxes between clients and nginx may mishandle the larger ClientHello; monitor handshake errors after rollout.

Verify

bash
echo | openssl s_client -connect your-host:443 2>/dev/null | grep "Negotiated TLS1.3 group"
# Negotiated TLS1.3 group: X25519MLKEM768
npx -y pqe-cli check your-host.example

In browser DevTools (Chrome: Security panel), the connection's key exchange shows X25519MLKEM768.

AWS Application / Network Load Balancer · configAWS ALB/NLB: switch HTTPS/TLS listeners to a PQ security policyProduction-ready

Why

Since November 2025, AWS Application Load Balancers and Network Load Balancers offer TLS security policies with hybrid post-quantum key exchange. Policies with PQ in their name support X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024 (TLS 1.3 only) alongside classical groups. Existing listeners keep their old policy until you change it.

At the time of writing the PQ policies include:

PolicyNotes
ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09Recommended by AWS; console default for new listeners
ELBSecurityPolicy-TLS13-1-2-PQ-2025-09TLS 1.2 + 1.3, broader cipher list
ELBSecurityPolicy-TLS13-1-3-PQ-2025-09TLS 1.3 only
...-FIPS-PQ-2025-09 variantsFIPS

Check the "Security policies" page of the ELB documentation for the current list before applying.

Steps

  1. List listeners and their policies:

    bash
    aws elbv2 describe-listeners --load-balancer-arn "$LB_ARN" \
      --query 'Listeners[].{Port:Port,Protocol:Protocol,Policy:SslPolicy,Arn:ListenerArn}'
  2. Update each HTTPS/TLS listener:

    bash
    aws elbv2 modify-listener --listener-arn "$LISTENER_ARN" \
      --ssl-policy ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09
  3. Infrastructure as code: change the policy there too (CloudFormation SslPolicy, Terraform aws_lb_listener.ssl_policy), or the next deploy reverts it.

  4. Watch ALB connection logs, which record the negotiated key exchange, to see what share of clients is post-quantum.

Before

hcl
resource "aws_lb_listener" "https" {
  ssl_policy = "ELBSecurityPolicy-TLS13-1-2-2021-06"
  # ...
}

After

hcl
resource "aws_lb_listener" "https" {
  ssl_policy = "ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09"
  # ...
}

Gotchas

  • Clients must also support it. Clients without ML-KEM (or on TLS 1.2) fall back to classical groups; nothing breaks.
  • ALB → target connections are a separate TLS session; targets need their own PQ-capable stack if you re-encrypt.
  • CloudFront, API Gateway and other services have their own settings and timelines; check each.
  • CNSA 2.0 policies (...-CNSA2-...-FIPS-PQ-2026-07) use pure ML-KEM-1024 and secp384r1 only, which many ordinary clients won't support.

Verify

bash
echo | openssl s_client -connect your-alb-hostname:443 2>/dev/null | grep "Negotiated TLS1.3 group"
npx -y pqe-cli check your-domain.example