Skip to content
Quantum Aether/Post-quantum TLS in Node.js (X25519MLKEM768): versions, config and checks · Quantum Aether
Live platformالعربية

Post-quantum TLS in Node.js (X25519MLKEM768): versions, config and checks

Updated:

Short answer

Node.js uses post-quantum TLS (X25519MLKEM768) automatically when it runs on OpenSSL 3.5 or newer, with no code change. Official Node.js 24 LTS binaries include OpenSSL 3.5. Check with node -p process.versions.openssl: a version below 3.5 (common with distro-built Node on Ubuntu 22.04 and 24.04), or an ecdhCurve pinned to one curve, means classical X25519 only.

Scan your site now, free

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

Node.js does its own TLS through the OpenSSL library it was built with. Since OpenSSL 3.5, the default TLS key shares offer the hybrid X25519MLKEM768 and plain X25519, so a Node.js HTTPS server on OpenSSL 3.5 is post-quantum ready without code changes.

1. Check which OpenSSL your Node.js uses

node -p process.versions.openssl

Official Node.js 24 LTS binaries include OpenSSL 3.5. Node.js packages from Linux distributions are often linked against the system OpenSSL instead (3.0 on Ubuntu 22.04 and 24.04), so the same Node major version can behave differently. Anything below 3.5 cannot negotiate ML-KEM.

2. Don't pin the curve list

By default ecdhCurve is 'auto', which uses OpenSSL's defaults and therefore includes the hybrid group. Old hardening snippets often set something like ecdhCurve: 'prime256v1', which silently removes it. Either delete the option or list the hybrid group first:

const https = require('node:https');
https.createServer({
  key, cert,
  minVersion: 'TLSv1.2',
  ecdhCurve: 'X25519MLKEM768:X25519:prime256v1',
}, app).listen(443);

3. Behind a proxy, the proxy decides

If nginx, a load balancer or a CDN terminates TLS in front of Node.js, browsers never talk TLS to Node.js directly; configure that layer instead (nginx, AWS ALB/CloudFront).

4. Outgoing requests

The same rule applies when Node.js is the client (fetch, https.request): on OpenSSL 3.5 it offers X25519MLKEM768 to servers that support it.

Verify

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: Node.js "v22 to v24" migration guide; OpenSSL 3.5 release notes. Checked 2026-11-09.

Frequently asked questions

Do I need to set ecdhCurve to X25519MLKEM768 in Node.js?

No. The default ecdhCurve: 'auto' keeps the hybrid group. Setting one curve such as 'prime256v1' removes it. If you need an explicit list, put the hybrid first: 'X25519MLKEM768:X25519:prime256v1'.

Does Node.js 22 support X25519MLKEM768?

Recent Node.js 22 builds can: in a published test, Node 22.22.0 reported OpenSSL 3.5.4 and negotiated X25519MLKEM768. Older 22.x builds do not. Check process.versions.openssl, not the major version.

Why does my Node.js server behind nginx or a load balancer not show X25519MLKEM768?

The layer that terminates TLS decides the key exchange. If nginx, a load balancer or a CDN sits in front, configure that layer; Node's own settings never reach the client.

Are outgoing fetch() and https.request() calls post-quantum?

On OpenSSL 3.5 they offer the hybrid group too. The connection uses it only when the remote server supports it.

How do I test a Node.js HTTPS server for X25519MLKEM768?

From an OpenSSL 3.5 client run openssl s_client -connect example.com:443 -groups X25519MLKEM768 </dev/null 2>/dev/null | grep -i group and look for the negotiated group, or use the free scan: grade A means TLS 1.3 with a hybrid post-quantum key exchange.

Scan your site now, free

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