Blog · 2026-12-03 · Security

The NSA post-quantum advisory: what it means for AI API traffic

The short version

  • On 2 December 2026 the NSA told the owners of US national security systems to move to post-quantum cryptography immediately. The reason it gave: AI companies disclosed new discoveries about the security of some cryptography.
  • The NSA did not say which algorithms are affected. Filippo Valsorda, a cryptography engineer, read the advisory closely. His reading: 256-bit elliptic curves (P-256, X25519, Ed25519) are probably weaker than we thought.
  • We tested the 23 API hosts that our gateway calls. 17 accept the hybrid post-quantum key exchange X25519MLKEM768. 6 accept only classical X25519.
  • Our own gateway did not use it with any of them, because the server's TLS library was OpenSSL 3.0. We fixed that on 4 December: see what we changed. Many Python and Node apps on servers have the same problem. Below is the one-line check.

1. What the NSA said

The NSA published a Cybersecurity Advisory and a press release. The NSA, CISA and the White House Office of the National Cyber Director (ONCD) also published a joint statement. The advisory is for the owners, operators and vendors of National Security Systems. It tells them to "immediately accelerate" their move to post-quantum cryptography.

The reason is new. The joint statement says that US AI companies "have disclosed discoveries that impact the security of some cryptography". It does not name the companies, and it does not name the algorithms. It also says that these advances "do not present an immediate and widespread threat to that cryptography".

The advisory repeats an old warning, and that warning is the part that matters for most developers: "Adversaries are already collecting encrypted information to decrypt once the capabilities become available." This attack is called "harvest now, decrypt later". An attacker records your encrypted traffic today and decrypts it when a break becomes practical.

A note on sources. The NSA and defense.gov servers refused our automated requests, so we could not read the advisory PDF ourselves. The quotes above come from the copies in Breaking Defense and in Filippo Valsorda's post. The links are at the end of this page. Read the originals before you make a decision on them.

2. How Filippo Valsorda reads it

Filippo Valsorda maintained the Go cryptography libraries for years. He wrote "What to Make of the NSA Advisory" on the same day. Read his post: it is short and specific. His argument depends on what the advisory lists, and on what it does not list.

His summary in one line: "256-bit elliptic curves (P-256 and Curve25519/X25519/Ed25519) are likely broken or significantly weaker than we thought". He calls his post a hasty draft. The NSA did not write those words. It is an inference from the wording, but it is a careful one.

Here is the difference between what is stated and what is inferred:

ClaimSource
Move to post-quantum cryptography now, not on the old schedule.Stated by the NSA
AI companies disclosed discoveries that affect some cryptography.Stated in the joint statement
The threat is not yet immediate and widespread.Stated in the joint statement
P-256, X25519 and Ed25519 are the affected algorithms.Inferred by Valsorda
The attack is classical, not quantum.Inferred by Valsorda
ML-KEM and ML-DSA are not affected.Inferred by Valsorda from the advisory text
Which companies, which attack, and how fast it runs.Not known

3. Why AI API traffic is a good target

The traffic to an LLM API contains your prompts, your documents, your users' messages, and an API key in every request header. People send things to a model that they would not put in an email. That is the kind of traffic that someone records and keeps.

TLS does two jobs, and the advisory changes the urgency of each one differently:

4. We tested 23 AI API hosts

On 3 December 2026 we connected to each upstream host that our gateway calls. We used OpenSSL 4.1 with its default settings, and we recorded the key exchange group that the server chose and the key type of its certificate.

HostKey exchangeCertificate key
generativelanguage.googleapis.comX25519MLKEM768P-256
api.groq.comX25519MLKEM768P-256
openrouter.aiX25519MLKEM768P-256
api.mistral.ai, codestral.mistral.aiX25519MLKEM768P-256
api.cloudflare.comX25519MLKEM768P-256
api.cerebras.aiX25519MLKEM768P-256
api.together.xyzX25519MLKEM768P-256
api.ai21.comX25519MLKEM768P-256
api.hyperbolic.xyzX25519MLKEM768P-256
api.novita.aiX25519MLKEM768P-256
router.huggingface.coX25519MLKEM768RSA 2048
api.cohere.aiX25519MLKEM768RSA 2048
api.fireworks.aiX25519MLKEM768RSA 2048
api.studio.nebius.comX25519MLKEM768RSA 2048
api.scaleway.aiX25519MLKEM768RSA 2048
ai-gateway.vercel.shX25519MLKEM768RSA 2048
api.deepinfra.comX25519 onlyP-256
api.sambanova.aiX25519 onlyRSA 2048
api.upstage.aiX25519 onlyRSA 2048
dashscope-intl.aliyuncs.com (Qwen)X25519 onlyRSA 2048
integrate.api.nvidia.comX25519 onlyRSA 2048
models.github.aiX25519 onlyRSA 4096

We also checked api.openai.com and api.anthropic.com, which our gateway does not call. Both chose X25519MLKEM768.

Two results stand out. First, key exchange is in good shape: 17 of 23 hosts are ready. The other 6 refused a handshake that offered only the hybrid group. Second, no host uses a post-quantum certificate. Every certificate is P-256 or RSA, as on the rest of the web. Under Valsorda's reading, the 12 hosts with P-256 certificates have the weaker key. That is not something you or the providers can fix this week. The Web PKI has no post-quantum certificates yet.

5. The weak link was our own server

The server must accept a hybrid key exchange, and the client must offer one. We checked our client too. Our gateway runs on Ubuntu 24.04. Its Python links to OpenSSL 3.0.13, and OpenSSL added ML-KEM in version 3.5. So every request from our gateway to a provider used classical X25519, also to the 17 hosts that were ready.

The first hop was safe. Browsers and API clients connect to dreamprompting.com through Cloudflare, and that connection negotiated X25519MLKEM768. The hops after Cloudflare did not: Cloudflare to our server, and our server to the model provider.

Many apps that call an LLM API have the same problem, and their owners do not know it. The SDK is new, but the TLS library under it is as old as the operating system. Check yours with these commands:

# Python: the TLS library your requests use
python3 -c "import ssl; print(ssl.OPENSSL_VERSION)"

# Node.js
node -p "process.versions.openssl"

# Does a host accept the hybrid group? (needs OpenSSL 3.5 or newer)
openssl s_client -groups X25519MLKEM768 -connect api.groq.com:443 \
  -servername api.groq.com </dev/null 2>&1 | grep "Negotiated TLS1.3 group"

If the first command shows OpenSSL 3.4 or older, your client cannot offer ML-KEM. Some builds link to other TLS libraries (BoringSSL, LibreSSL), so check the version of the library that is actually loaded. An OpenSSL upgrade usually means a newer OS release, a newer base container image, or a Python build that brings its own OpenSSL.

6. What to do

This list is for developers who send data to AI APIs. For the full list, wait for Valsorda's follow-up post, and read the NSA advisory.

  1. Upgrade the TLS library under your API client to a version that offers X25519MLKEM768. This step protects recorded traffic, and it is the one with the most urgency.
  2. Prefer providers that accept the hybrid group when you send sensitive prompts. The table above shows the current state of 23 hosts.
  3. Check SSH. Run ssh -Q kex. OpenSSH 9.0 and newer offer sntrup761x25519-sha512 by default, and 9.9 added mlkem768x25519-sha256. Our server already negotiates the first one. Valsorda also recommends new ssh-mldsa44-ed25519 host and user keys, which need a newer OpenSSH than most servers have.
  4. Make an inventory. Find the places where your own code signs or encrypts with P-256 or Ed25519: JWT signing keys (ES256, EdDSA), webhook signatures, encrypted backups. Plan how to replace them, and plan for a fast change if the attack gets cheaper.
  5. Keep API keys short-lived. A key that you rotate often loses value if someone decrypts old traffic later.

7. What we changed (update, 4 December 2026)

This test found a problem in our own gateway, so we fixed it the next day. The site stayed up during the change.

Two parts are not fixed, and we cannot fix them ourselves. The 6 providers without the hybrid group still get classical key exchange, and every provider certificate is still P-256 or RSA.

Want the same check on your system?

We now offer this as a service. We measure every connection, fix the weak ones with your team, and test again. See the post-quantum readiness audit.

Sources