{"schemaVersion":"1.0","type":"TechArticle","types":["Article","TechArticle"],"slug":"post-quantum-cryptography-for-node-js-backends-what-to-migrate-first-vshqd","url":"https://zyvop.com/post-quantum-cryptography-for-node-js-backends-what-to-migrate-first-vshqd","title":"Post-Quantum Cryptography for Node.js Backends: What to Migrate First","subtitle":"The NSA says accelerate. The joint statement says no immediate threat. Here is the order of work, with code for Node 24.","tldr":"A joint US government statement and an NSA advisory put post-quantum migration back on the agenda, without naming an algorithm or a result. This is the order of work for a Node.js backend: hybrid TLS first, signatures with care, and algorithms you can swap by config.","keywords":["backend","TLS","security","post-quantum","jwt","nodejs","IT Security"],"entities":["Sanju Singh","backend","TLS","security","post-quantum","jwt","nodejs","IT Security","ZyVOP"],"keyTakeaways":["The White House cyber office, the NSA and CISA have put out a joint statement saying American AI companies disclosed discoveries that affect the security of some cryptography in use today.","The same statement assesses that these advances do not present an immediate and widespread threat.","The NSA, in a release and an advisory titled \"Immediate Actions to Push Toward Post-Quantum\" (PP-26-4956), told owners, operators and vendors of national security systems to \"immediately accelerate\" their move to post-quantum cryptography (PQC)."],"headings":["What happened","Two risks, two timelines","1. Inventory","2. Turn on hybrid TLS first","3. Internal links","4. Make algorithms swappable","5. Signatures: the quieter risk, and possibly the weaker link","Public certificates","Internal signatures","6. Long-lived secrets","Three mistakes to avoid","Sources"],"outboundLinks":["https://www.nsa.gov/Press-Room/Press-Releases-Statements/Press-Release-View/Article/4662453/joint-statement-from-oncd-nsa-and-cisa-on-recent-advances-in-cryptographic-and/","https://www.nsa.gov/Press-Room/Press-Releases-Statements/Press-Release-View/Article/4662430/nsa-advises-immediate-transition-to-post-quantum-cryptography-to-protect-nation/","https://csrc.nist.gov/pubs/ir/8547/final","https://cirg.org/statements/1/","https://github.com/anthropics/formal-math/tree/main/lattices","https://blog.google/security/keeping-https-connections-safe-in-chrome/","https://www.whitehouse.gov/presidential-actions/2026/06/securing-the-nation-against-advanced-cryptographic-attacks/","https://www.whitehouse.gov/wp-content/uploads/2026/06/M-26-15-Execution-of-the-Migration-to-Post-Quantum-Cryptography.pdf","https://www.rfc-editor.org/rfc/rfc10024","https://developers.cloudflare.com/ssl/post-quantum-cryptography/pqc-support/","https://news.sulat.com/2026/12/03/nsa-post-quantum-advisory/","https://tldr.fail/","https://mariadb.com/docs/server/security/encryption/data-in-transit-encryption/post-quantum-cryptography-in-mariadb-tls","https://www.openssh.org/pq.html","https://words.filippo.io/nsa-advisory/","https://labs.cloudsecurityalliance.org/research/csa-research-note-nsa-immediate-pqc-directive-private-disclo/","https://datatracker.ietf.org/doc/rfc9964/","https://datatracker.ietf.org/doc/draft-ietf-jose-pq-composite-sigs/","https://www.rstreet.org/commentary/statement-on-nsa-post-quantum-cryptography-memo-immediately-accelerate-not-immediately-transition/","https://nvd.nist.gov/vuln/detail/CVE-2026-10097","https://media.defense.gov/2026/Dec/01/2004039413/-1/-1/0/CSA_Immediate_Actions_Push_Toward_PQC.PDF","https://postquantum.com/security-pqc/nist-ir-8547-final/","https://blog.cloudflare.com/pq-is-still-safe/","https://www.theregister.com/security/2026/12/02/nsa-pushes-post-quantum-cryptography-but-quantum-computers-not-the-cause/5314095","https://circleid.com/posts/chrome-plans-to-end-trust-in-p-256-ca-keys-in-march-2027","https://nodejs.org/download/release/latest-v24.x/docs/api/crypto.html","https://nodejs.org/docs/latest/api/tls.html","https://nodejs.org/api/webcrypto.html","https://github.com/panva/jose/releases/tag/v6.1.0","https://pqc.tencent.com/en/products/jose/"],"contentText":"The White House cyber office, the NSA and CISA have put out a joint statement saying American AI companies disclosed discoveries that affect the security of some cryptography in use today. The same statement assesses that these advances do not present an immediate and widespread threat. The NSA, in a release and an advisory titled \"Immediate Actions to Push Toward Post-Quantum\" (PP-26-4956), told owners, operators and vendors of national security systems to \"immediately accelerate\" their move to post-quantum cryptography (PQC). If you run a Node.js backend, the news changes your to-do list less than the headlines suggest. The first two items below cost almost nothing, and everything after them is preparation that pays off whichever way the research goes. Note: Neither the joint statement nor the NSA advisory names a company, an algorithm or a result, and neither says any algorithm is broken. The advisory is guidance for national security systems and the defense industrial base, so it does not bind everyone else. Federal agencies and covered federal contractors have their own deadlines under EO 14412 (see the table below). If you sell to the US government, check your contract terms. What happened October 27: NIST published the final IR 8547. Every approved RSA, ECDSA, EdDSA and classical Diffie-Hellman scheme, including P-256 and Ed25519, is deprecated after 2030 and disallowed after 2035. The 2024 draft had no deprecation step for P-256 or Ed25519, so that part is new. November 30: The Cryptography Incident Review Group (CIRG) published its assessment of Anthropic's lattice results. The headline result is a quantum algorithm against certain module-lattice problems, the family behind ML-KEM and ML-DSA. Same assessment: CIRG calls the attack's cost \"galactic\" for the standardized parameters and says it needs large-scale quantum computation, so current parameters are not practically affected. It still expects the attack to improve, and advises migrating anyway: pick the highest security level you can support, use hybrids, and design for replacement. December 2: The joint statement and the NSA advisory arrived. The NSA's own release calls the discoveries a significant threat, while the joint statement says there is no immediate and widespread threat. Eight companies (Amazon, Anthropic, Apple, Cloudflare, Google, Microsoft, OpenAI and Oracle) backed migrating to NIST's standards. December 3: Google announced that Chrome intends to stop trusting CA keys that use ECDSA P-256 from March 15, 2027 (details in section 5). Dates that matter for planning: Date What happens Who it binds December 19, 2026 Proposed FAR rule due under EO 14412 (180 days from signing): covered federal contractors to meet NIST's post-quantum FIPS by end of 2030 Federal contractors January 1, 2027 CNSA 2.0 required in new national security acquisitions NSS owners and vendors March 15, 2027 Chrome intends to stop trusting P-256 CA keys Anyone with a public HTTPS site January 2, 2030 TLS 1.3 support required of federal agencies (OMB M-26-15, citing EO 14306) Federal agencies December 31, 2030 Post-quantum key establishment due on federal high-value assets and high-impact systems Federal agencies After 2030 NIST deprecates RSA, ECDSA, EdDSA and classical DH at every approved strength, including P-256 and Ed25519 Anyone following NIST December 31, 2031 Post-quantum signatures due on federal priority systems Federal agencies After 2035 NIST disallows quantum-vulnerable algorithms Anyone following NIST The federal rows come from EO 14412 and OMB M-26-15, which exclude national security systems. Those follow CNSA 2.0 on a separate schedule. The January 2, 2030 TLS 1.3 date comes from published analyses of the memo, so confirm it in the memo itself. Two risks, two timelines Key exchange (traffic in transit) Signatures (JWTs, certificates, code signing) Attack Record traffic now, decrypt it later Forge a signature once the algorithm falls Urgency Now, if the data must stay secret for years. The NSA says adversaries are already collecting encrypted data. Not a harvest risk, so less urgent if a quantum computer is the only threat. If a classical curve turns out weaker than assumed, forgery becomes a present-day risk. Sooner for firmware and roots of trust, which are hard to update. Available today Hybrid X25519MLKEM768, on by default in modern stacks ML-DSA, with thin library and PKI support That sets the order of work: flowchart LR A[\"1. Inventory&lt;br/&gt;where crypto lives\"]:::s1 --&gt; B[\"2. Hybrid TLS&lt;br/&gt;key exchange\"]:::s2 --&gt; C[\"3. Internal links&lt;br/&gt;DB, SSH, queues\"]:::s3 --&gt; D[\"4. Swappable algorithms&lt;br/&gt;config, rotation\"]:::s4 --&gt; E[\"5. Signatures&lt;br/&gt;JWTs, private CA, signing\"]:::s5 --&gt; F[\"6. Long-lived secrets&lt;br/&gt;key wrapping\"]:::s6 classDef s1 fill:#334155,stroke:#0f172a,color:#ffffff classDef s2 fill:#0f766e,stroke:#134e4a,color:#ffffff classDef s3 fill:#1d4ed8,stroke:#1e3a8a,color:#ffffff classDef s4 fill:#b45309,stroke:#78350f,color:#ffffff classDef s5 fill:#6d28d9,stroke:#4c1d95,color:#ffffff classDef s6 fill:#be123c,stroke:#881337,color:#ffffffSwappable algorithms come before signatures on purpose. It is the cheapest step against the biggest uncertainty, and the signature work in section 5 depends on it. 1. Inventory The NSA's first action is a list of every use of TLS, IPsec, SSH, certificates, code signing, Wi-Fi and identity credentials, with the algorithm, product, patch level and owner for each. Put the systems that hold long-lived data, face the internet or have many dependents at the top. A first pass over a Node codebase: grep -rnE \"ecdhCurve|DEFAULT_ECDH_CURVE|createECDH|RS256|ES256|EdDSA|Ed25519|secp256|prime256v1|P-256\" src/ config/ infra/Also check nginx and load balancer configs, SSH settings, CI signing steps and any private CA. Mark signing keys, CA keys and anything using P-256, Ed25519 or RSA below 3072 bits as priority items, since those are the likeliest to move first. 2. Turn on hybrid TLS first Browsers already offer X25519MLKEM768, so most of your clients are ready. The hybrid is specified in RFC 10024 (August 2026), which the NSA advisory points to for TLS 1.3. Server-side support, per Cloudflare's tracker (last updated June 24, 2026): Component Hybrid key exchange by default Chrome, Edge 131+ Firefox 132+ (Android 145+) Safari 26+ Node.js 24.5.0+ and 22.20.0+ (bundled OpenSSL 3.5) OpenSSL 3.5.0+ nginx When built against OpenSSL 3.5+ Caddy / Traefik 2.10.0+ / 3.4.2+ (also 2.11.26+) Go 1.24+ Java 27+ The Node row applies to official builds, which bundle OpenSSL 3.5. A Node build linked to a system OpenSSL depends on that library's version, so check process.versions.openssl. For Node, the best configuration is usually none. The default group list already includes the hybrid. The trap is an old hardening guide that pins a curve list: in a loopback test on Node 24.23 (OpenSSL 3.5.9), a default server negotiated X25519MLKEM768, but a server pinned to P-256 alone quietly fell back to classical prime256v1. import tls from 'node:tls' import fs from 'node:fs' const key = fs.readFileSync('key.pem') const cert = fs.readFileSync('cert.pem') // Node 24.5+ / 22.20+: leave ecdhCurve unset and the hybrid is offered. // If you must pin a list, put the hybrid first and keep classical fallbacks. const server = tls.createServer({ key, cert, ecdhCurve: 'X25519MLKEM768:X25519:P-256', })Hybrid groups exist only in TLS 1.3, and the NSA's second action is to move servers and load balancers to TLS 1.3 and remove weaker curve and Diffie-Hellman options. In Node, set minVersion: 'TLSv1.3' once your logs show you won't strand TLS 1.2 clients. To verify, use OpenSSL 3.5 or later and look for the negotiated group: openssl s_client -connect api.example.com:443 -brief # Negotiated TLS1.3 group: X25519MLKEM768From Node, getEphemeralKeyInfo() reports the group, but only on client sockets (it returns null on a server socket) and only in Node 24.19.0+ and 26.5.0+: const socket = tls.connect({ host: 'api.example.com', port: 443 }, () =&gt; { console.log(socket.getEphemeralKeyInfo()) // { type: 'TLSGroup', name: 'X25519MLKEM768' } socket.end() })Older builds return an empty object even when the hybrid was negotiated, so read empty as \"unknown,\" not \"classical.\" Node 22 isn't covered by the sources checked here, so verify there with OpenSSL, and test from outside in any case. Two cautions before you roll this out: Size. The hybrid ClientHello is much larger. A Node 24.23 client measured 334 bytes without the hybrid and 1,568 with it, and Sulat saw 212 grow to 1,446 with OpenSSL's s_client. A ClientHello that spans more than one packet trips up some servers and middleboxes (tldr.fail documents the problem), so test your load balancers and appliances. Compatibility. A server limited to post-quantum groups rejected an X25519-only client (ERR_SSL_NO_SUITABLE_KEY_SHARE), and Sulat saw the same with an OpenSSL 3.0 client. Offer the hybrid with a classical fallback, and do not go post-quantum-only on public endpoints. That fallback deserves one more thought. The classical half of the hybrid is X25519, one of the curves the NSA list leaves out (see section 5). That does not weaken the hybrid, which holds as long as either half does, but it makes the fallback the exposed part. Treat it as a compatibility measure for old clients: log how often it happens and let the number shrink. RFC 10024 also defines SecP384r1MLKEM1024, which uses P-384, a curve the NSA list does not flag. Cloudflare's tracker lists it for AWS-LC and GnuTLS but not OpenSSL, so it is something to watch, not something to deploy today. 3. Internal links Internal links follow the same rule. Servers that use OpenSSL 3.5 or later with its default group list negotiate the hybrid automatically, as MariaDB documents. OpenSSH has defaulted to a hybrid since 10.0, and OpenSSH 10.1 warns when a connection uses a non-post-quantum key exchange. Check every hop, not just the front door. A post-quantum handshake between a browser and your CDN edge does not extend to the connection from the edge to your origin. Log the negotiated group on each production connection so you know which links are still classical. 4. Make algorithms swappable CIRG's advice is to design agile systems, and every date in the table can move. Do this before you change any algorithm: Read the algorithm allow-list, the TLS group list and key IDs from config, so a change is a deploy, not a refactor. Accept two algorithms at once during an overlap window. Put a kid on every token, rotate keys on a schedule, and rehearse an emergency rotation. A forced curve change is exactly this case. Reissue certificates and rotate signing keys end to end in staging, so the first time is not an incident. Keep the inventory from section 1 current, and update it with each release. Budget for size. Post-quantum handshakes, certificates and tokens are much bigger, and the NSA tells owners to check that systems have the processing power, memory and capacity for future algorithm updates. Check header limits, cookie sizes and load balancer buffers now. 5. Signatures: the quieter risk, and possibly the weaker link Step one of the advisory tells national security owners to flag algorithms that neither CNSA 1.0 nor 2.0 approves, including EdDSA and elliptic curves other than P-384 and P-521. There are two readings of that list. Filippo Valsorda reads it as a hint that 256-bit curves (P-256, X25519, Ed25519) are probably broken or materially weaker than assumed, while ML-KEM and ML-DSA are fine. The competing reading is that those algorithms were never approved for national security systems, so the list may restate long-standing policy. Neither reading is confirmed. The NSA has not said any algorithm is broken, and Anthropic's lattice results concern lattices, not curves. The working assumption that holds under both readings is that ES256 and EdDSA have no public evidence against them, and that several authorities are acting as if the question is open. Two facts make that matter: A weakened curve means forgery today. CSA's analysis makes the point that for authentication, the consequence is present-day forgery and impersonation, not future decryption. That makes signatures the likeliest place for exposure to concentrate. NIST's schedule is firm. The final IR 8547 deprecates ECDSA and EdDSA at every approved strength after 2030 and disallows them after 2035. So treat every ES256, EdDSA and RS256 use as a priority inventory item with an owner and a migration date. Public certificates You still can't buy a post-quantum certificate for a public site, and Chrome does not plan to add standard X.509 post-quantum certificates to its root store. It is moving to Merkle Tree Certificates, which Google expects to be available very early in 2027. One date is already set. From March 15, 2027, Chrome intends to stop trusting CA keys that use ECDSA P-256, and sites whose chain includes such a CA need a replacement certificate or visitors get a full-page interstitial. Google says the replacement should come from a CA that does not use P-256, ideally one that is CNSA 1.0 compliant. A P-256 key on your own server is not what triggers it, but Google also encourages moving server keys off P-256. Check what your server sends: openssl s_client -connect api.example.com:443 -showcerts &lt;/dev/null 2&gt;/dev/null \\ | awk '/-----BEGIN CERTIFICATE-----/{n++} n{print &gt; (\"chain-\" n \".pem\")}' for f in chain-*.pem; do openssl x509 -in \"$f\" -noout -subject openssl x509 -in \"$f\" -noout -text | grep -E \"Public Key Algorithm|ASN1 OID\" done # chain-1 is your leaf. A CA certificate showing prime256v1 is the problem.Servers usually don't send the root, so ask your CA which roots and intermediates it uses. Internal signatures JWTs, service tokens, code signing and private CAs are the part you control. RFC 9964 defines ML-DSA-44, ML-DSA-65 and ML-DSA-87 for JOSE. You need jose 6.1.0 or later on Node 24.7 or later, because signing and verification depend on the runtime's Web Crypto support. Node marks its modern Web Crypto algorithms \"active development,\" so check the stability notes for your version. import * as jose from 'jose' // 6.1.0+, Node 24.7+ for ML-DSA const { publicKey, privateKey } = await jose.generateKeyPair('ML-DSA-65') const jwt = await new jose.SignJWT({ sub: 'user-123' }) .setProtectedHeader({ alg: 'ML-DSA-65', kid: 'sig-2026-12' }) .setIssuedAt() .setExpirationTime('15m') .sign(privateKey) // JWT_ALGS=\"ES256,ML-DSA-65\" while migrating, \"ML-DSA-65\" afterwards. // Never trust the token's own header to choose the algorithm. const algorithms = (process.env.JWT_ALGS ?? 'ES256').split(',') const { payload } = await jose.jwtVerify( jwt, async (header) =&gt; keyStore.get(header.kid), // your kid -&gt; key lookup { algorithms }, )The catch is size. An ML-DSA-65 signature is 3,309 bytes, and a one-claim JWT came to 4,536 characters, against 192 for the same token signed with ES256 (jose 6.3.0, Node 24.23). That token no longer fits in a browser cookie, and it can strain header limits on proxies and load balancers. %%{init: {\"theme\": \"base\", \"themeVariables\": {\"xyChart\": {\"plotColorPalette\": \"#6d28d9\"}}}}%% xychart-beta title \"Signature size in bytes\" x-axis [\"ES256 / EdDSA\", \"RS256 (2048-bit)\", \"ML-DSA-44\", \"ML-DSA-65\", \"ML-DSA-87\"] y-axis \"Bytes\" 0 --&gt; 5000 bar [64, 256, 2420, 3309, 4627]The example uses ML-DSA-65 as a size trade-off. CNSA 2.0 names ML-DSA-87 if you need it, at 4,627 bytes per signature. Most JWT libraries and identity providers do not accept these alg values yet. A hybrid format, ML-DSA-65-ES256, exists only as an IETF draft, and its classical half is the P-256 curve in question. Keep ML-DSA tokens on internal hops you control until the ecosystem catches up. Short expiry limits replay of stolen tokens, not forgery: if an algorithm falls, the forger simply mints fresh tokens. Look beyond JWTs, too. CSA lists SSH, OIDC tokens, passkeys, DNSSEC, workload identity and device attestation among typical ES256, Ed25519 or RSA dependencies. Ask your identity provider, HSM and KMS vendors for dated ML-DSA roadmaps. 6. Long-lived secrets Data at rest encrypted with AES-256 is already considered safe against known quantum attacks, and MariaDB's documentation says as much. What is exposed is the public-key step that wraps or delivers those keys, such as RSA-OAEP, ECIES or ECDH. If a secret must stay confidential for years, protect that key-delivery step with ML-KEM at the application layer. Node 24.7 added encapsulate and decapsulate: import { generateKeyPairSync, encapsulate, decapsulate, hkdfSync } from 'node:crypto' const { publicKey, privateKey } = generateKeyPairSync('ml-kem-1024') const { ciphertext, sharedKey } = encapsulate(publicKey) // sender const recovered = decapsulate(privateKey, ciphertext) // recipient // Never use the shared key directly. Derive the AES-256-GCM key with HKDF. const aesKey = Buffer.from(hkdfSync('sha384', sharedKey, 'salt', 'wrap-v1', 32))The example uses ML-KEM-1024 because CIRG advises the highest level you can support and CNSA 2.0 names it. NIST's default is ML-KEM-768, which is also what TLS hybrids use, so 768 is fine where interoperability or size matters. Check each API's stability marker in the Node docs for your version before relying on it in production. If you want a hybrid outside TLS, don't hand-roll the combiner. RFC 10024's own security section warns that its analysis relies on the TLS 1.3 transcript, so the same combination is not automatically safe in other protocols. Follow NIST SP 800-227 or use a library built on a construction with its own security analysis, and prefer AES-256 and SHA-384 or larger for new designs, as CNSA 2.0 does. Three mistakes to avoid Treating it as an emergency rewrite. R Street's response to the advisory makes the useful distinction: starting the transition immediately is not the same as finishing it immediately. Rushed migrations cause outages, and the inventory and hybrid TLS work are worth doing under either reading of the news. Running research libraries in production. Cloudflare's tracker lists Open Quantum Safe's liboqs as a reference implementation, not recommended for production. Assuming new means safe. Early implementations of new algorithms carry bugs. CVE-2026-10097 in wolfSSL's AVX2 ML-KEM-1024 decapsulation skipped the last 32 bytes of the ciphertext check, and a proof of concept recovered a static private key with roughly 350 chosen ciphertexts. Keep your cryptographic libraries patched. Sources Government and standards Joint statement from ONCD, NSA and CISA (December 2, 2026) NSA: Advises Immediate Transition to Post-Quantum Cryptography NSA advisory PDF: Immediate Actions to Push Toward Post-Quantum EO 14412: Securing the Nation Against Advanced Cryptographic Attacks OMB M-26-15: Execution of the Migration to Post-Quantum Cryptography NIST IR 8547 final, and what changed from the draft RFC 10024: PQ/T hybrid key agreement for TLS 1.3 RFC 9964: ML-DSA for JOSE and COSE and the IETF draft on PQ/T hybrid composite signatures for JOSE and COSE CVE-2026-10097 (wolfSSL ML-KEM-1024) Research and analysis CIRG: Initial Assessment of Anthropic's Findings on Lattice Cryptography and Anthropic's lattice results Cloudflare: Post-Quantum Cryptography Is Still Safe Filippo Valsorda: What to Make of the NSA Advisory CSA research note: Urgency From Undisclosed Findings, the NSA's Immediate-PQC Advisory R Street: Immediately accelerate, not immediately transition JP Caparas, Sulat: NSA urges an immediate push to post-quantum cryptography (summary of the advisory, with handshake measurements) The Register: NSA pushes post-quantum cryptography Browsers, libraries and tools Google: Keeping HTTPS Connections Safe in Chrome (December 3, 2026) CircleID: Chrome plans to end trust in P-256 CA keys in March 2027 Cloudflare: PQC support tracker (last updated June 24, 2026) Node.js crypto documentation, TLS documentation and Web Crypto documentation jose v6.1.0 release and Tencent PQC InfoHub: jose support MariaDB: Post-quantum cryptography in MariaDB TLS OpenSSH: Post-quantum cryptography tldr.fail: TLS ClientHello handling bugs","contentHash":"sha256:21edd1d45380c4049374f20a2c4eb4fe00807ba10058e008b94eb652662fdb8d","authorName":"Sanju Singh","authorUrl":"https://zyvop.com/author/sanjay687","authorSameAs":[],"category":"IT Security","tags":["backend","TLS","security","post-quantum","jwt","nodejs"],"audience":"Software engineers and developers building applications with IT Security","tone":"Instructional, practical, code-first","readingTimeMinutes":13,"wordCount":3218,"faqs":null,"primaryTopic":"IT Security","publishedAt":"2026-12-05T10:33:58.971Z","updatedAt":"2026-12-05T10:33:58.971Z","canonicalUrl":"https://zyvop.com/post-quantum-cryptography-for-node-js-backends-what-to-migrate-first-vshqd"}