qsafe.sh
Scan
Theme

Fix guides

How to enable post-quantum TLS on Node.js

Checked · Official docs

Works when Node.js uses OpenSSL 3.5+ (check node -p process.versions.openssl).

When Node.js faces the internet directly, it negotiates TLS with every visitor, so the change belongs in its TLS configuration. If a CDN or load balancer sits in front, fix that first: it is what visitors connect to. The hybrid falls back to classical X25519 for clients that don't support it, so turning it on doesn't break older browsers.

Turn on post-quantum key exchange

Use a Node.js release bundled with OpenSSL 3.5+, and if you set ecdhCurve, include the hybrid:

where you create the HTTPS server
https.createServer({
  key, cert,
  ecdhCurve: "X25519MLKEM768:X25519:P-256",
  minVersion: "TLSv1.2",
}, app);

Turn off TLS 1.0 and 1.1

Set minVersion:

https.createServer options
minVersion: "TLSv1.2"

Check that it worked

After you deploy, rescan your domain. A quantum-safe setup shows X25519MLKEM768 as the negotiated key exchange. From a terminal:

curl qsafe.sh/your-domain.com?fresh

Prefer to let an AI agent make the change? The qsafe-fix skill and the MCP server use this same guide. It's also available as JSON from /api/v1/fixes/nodejs.

Esc