Post quantum API security: what your endpoints and agent clients negotiate
Post quantum API security for agent builders: test X25519MLKEM768 on your endpoints and HTTP clients, then plan API keys, JWTs and certificates by date.
The looot team · · 9 min read
On this page
Post quantum API security comes down to one question per connection: did the TLS handshake use the hybrid group X25519MLKEM768? For most APIs the answer depends on two pieces of software you already run, the server that terminates TLS and the HTTP client inside your agent, and you can test both in a few minutes. Hybrid key exchange protects request and response bodies from traffic that is recorded today and decrypted later. It does not make your certificates, your JWT signatures or the way you issue API keys post-quantum, so those get their own plan below.
The push this month came from the NSA advisory "Immediate Actions to Push Toward Post-Quantum" (NSA, Dec 2026), which asks organizations to inventory their cryptography and switch TLS 1.3 to post-quantum hybrid settings, and from a 2 December statement in which Amazon, Anthropic, Apple, Cloudflare, Google, Meta, Microsoft, OpenAI and Oracle backed moving to NIST's algorithms as soon as possible. For calibration: the ONCD, NSA and CISA joint statement says recent AI-driven findings "do not present an immediate and widespread threat" to cryptography in use, and an independent review of Anthropic's lattice papers calls the new attack far beyond practical reach. Nothing you run today is known to be broken. The work is about getting ahead of a deadline.
One tool call, several handshakes
Picture an agent that calls a data API through a gateway. That single tool call opens at least three TLS connections, and each one picks its key exchange on its own:
- Agent to your edge. The agent's HTTP client (Node `fetch`, Python `httpx` or `requests`, Go `net/http`) sends the list of groups it supports. Your edge server picks one.
- Edge to origin. If a CDN sits in front, it opens a second connection to your servers. Cloudflare's connection to origins supports X25519MLKEM768, and origins that are not ready can sit behind Cloudflare Tunnel, which carries traffic over post-quantum encryption.
- Your server to upstream APIs. Now you are the client. Your outbound library decides what to offer, and each provider's server decides what to accept.
A gateway that fronts many providers behind one key, like the model described on our how it works page, multiplies hop 3: one handshake per provider, each against a different TLS stack. You control what you offer on every hop. You only control what gets accepted on the hops where you run the server.
Check the server side
Point OpenSSL 3.5 or later at your API host and offer only the hybrid group:
openssl s_client -connect api.example.com:443 -servername api.example.com \
-groups X25519MLKEM768 </dev/null 2>&1 | grep -E "Negotiated|Peer signature type"A server that supports it prints `Negotiated TLS1.3 group: X25519MLKEM768`. A server that does not will fail the handshake, because you gave it nothing else to choose. Look at the second line too. If it reads something like `ecdsa_secp256r1_sha256` or `rsa_pss_rsae_sha256`, the key exchange was hybrid but the certificate signature was classical ECDSA or RSA. That one output shows the gap this post keeps coming back to.
Two more server checks:
- Docs and dashboards. Open the page in Chrome, then DevTools, then the Security panel. It names the key exchange for the connection. Chrome has offered ML-KEM since Chrome 131.
- Edge numbers. Cloudflare has used post-quantum key agreement by default since 2022 and reports that 73% of human (browser) connections to its network are post-quantum encrypted as of 3 December 2026 (Cloudflare). Cloudflare Radar's post-quantum page tracks adoption and tests a host.
If you terminate TLS yourself, Cloudflare's support list shows hybrid key agreement on by default in NGINX built against OpenSSL 3.5 or later, Caddy 2.10.0 and later, and Traefik 3.4.2 and later.
Check the client side
Agents are clients first. This is where old container images hide. Each runtime below offers X25519MLKEM768 by default from the version listed, according to its own release notes:
| Runtime | Default from | Check | Watch for |
|---|---|---|---|
| OpenSSL | 3.5.0, 8 April 2025 (NEWS) | `openssl version` | Distro packages still on 3.0 or earlier |
| Go | 1.24 (notes) | `go version` | A `Config.CurvePreferences` list without X25519MLKEM768; `GODEBUG=tlsmlkem=0` turns it off |
| Node.js | 24.5.0 and 22.20.0, which bundle OpenSSL 3.5 (v24, v22) | `node -p process.versions.openssl` | Builds linked to an older system OpenSSL; a hard-coded `ecdhCurve` |
| Python | Whatever OpenSSL the interpreter loads (ssl docs) | `python3 -c "import ssl; print(ssl.OPENSSL_VERSION)"` | Slim base images with an old libssl |
Python 3.15 adds `SSLContext.set_groups()` and `SSLSocket.group()`, so you can set and read the group directly. On older versions the defaults come from OpenSSL.
To see what a client negotiates in practice, call an endpoint that reports it. Cloudflare documents `/cdn-cgi/trace` as a troubleshooting endpoint, and at the time of writing its output includes a `kex=` line with the group your client used. In Node:
const res = await fetch("https://www.cloudflare.com/cdn-cgi/trace");
const text = await res.text();
console.log(text.split("\n").find((line) => line.startsWith("kex=")));In Go 1.25 or later, `ConnectionState.CurveID` exposes the key exchange, so you can log it on every outbound call to a provider:
resp, err := http.Get("https://provider.example.com/v1/health")
if err == nil {
log.Printf("host=%s kex=%s", resp.Request.URL.Host, resp.TLS.CurveID)
}Run these inside the image your agent ships in, not on your laptop. A laptop's system `curl` may use a different TLS library than the runtime in production and give you a different answer.
One Go note: the 1.24 release notes mention buggy servers that mishandle the larger hybrid handshake and offer `tlsmlkem=0` as the escape hatch. If a provider forces you to use it, scope it to that binary, log it and put a date on removing it.
API keys, JWTs and signatures: a separate track
API keys. A bearer key rides inside the TLS session. If a session that carried it used classical key exchange and is decrypted years from now, the key is exposed along with the payload. Once both sides of your hops negotiate the hybrid group, rotate long-lived keys that crossed older sessions, and prefer short-lived, scoped keys for agents.
JWT signing. RS256 and ES256 are RSA and ECDSA signatures. A recorded token does not help an attacker after it expires; the risk is a future forger minting new tokens with your signing key's math. RFC 9964 (May 2026) defines ML-DSA for JOSE, with `alg` values such as `ML-DSA-44` and a new `AKP` key type. Cloudflare plans post-quantum JWTs across its internal and customer interfaces by the end of Q2 2027 (Cloudflare). Before you switch, confirm that every verifier and identity provider you depend on supports it. What you can do now:
- Move the accepted `alg` list into config, and make sure verifiers reject anything not on it.
- Publish keys through a JWKS with `kid` values so a new key type can sit next to the old one.
- Shorten token lifetimes so a cutover does not strand old tokens.
Webhook HMACs use shared secrets, not public-key math. NIST IR 8547, NIST's final transition plan (October 2026), covers digital signatures and key establishment: it deprecates the quantum-vulnerable ones after 2030 and disallows them after 2035.
Certificates. From 15 March 2027 (Chrome 164 and later), Chrome will block TLS certificates whose chain includes any CA certificate with an ECDSA P-256 key (Chrome Root Program). Leaf certificates with P-256 keys still work for now. CAs have been told to issue from P-384 or RSA 3072 and up, which Chrome calls an interim step that does not protect against quantum computers. The long-term answer is Merkle Tree Certificates; Cloudflare plans to issue its first ones in early 2027. Your SDK clients use their own trust stores, so the Chrome rule does not bind them directly. But API hosts often share a certificate with the dashboard and docs that people open in Chrome, so check the chain now.
What changes for agent tool calls
- Remote MCP servers and tool endpoints are HTTP APIs. Run the same server and client checks on them. A local stdio server has no handshake of its own, but every outbound call it makes does.
- Pinned images age quietly. Teams pin agent images for reproducible runs, and the pinned libssl decides your key exchange. Add the `kex` check to CI so an old base image fails the build.
- Fan-out needs logging. One task can touch a dozen hosts. Log host and negotiated group per call, then sort by classical-only to get your vendor list.
- Ask providers directly. NSA action 5 is to apply vendor updates and use only approved, post-quantum profiles. Ask each provider which groups their endpoints accept and when they plan to change certificates. Ask any gateway in the path the same questions. Our security page lists what looot does and does not claim.
A timeline for API teams
| Date | What happened or happens | Source |
|---|---|---|
| 13 Aug 2024 | NIST finalizes FIPS 203 (ML-KEM), 204 (ML-DSA), 205 (SLH-DSA) | NIST |
| May 2026 | RFC 9964 defines ML-DSA for JOSE and COSE | RFC Editor |
| Aug 2026 | RFC 10024 standardizes hybrid TLS 1.3 key agreement, including X25519MLKEM768 | RFC Editor |
| Dec 2026 | NSA advisory with six immediate actions | NSA |
| 2 Dec 2026 | Industry joint statement backing the move | Anthropic |
| 15 Mar 2027 | Chrome 164+ blocks chains with a P-256 CA key | CCADB |
| End of Q2 2027 | Cloudflare targets post-quantum JWTs, TLS and SSH on its interfaces | Cloudflare |
| 2027 | Cloudflare targets fully post-quantum, moved up from 2029 | Cloudflare |
| 2030 / 2035 | NIST plan (final): deprecate, then disallow quantum-vulnerable algorithms | NIST IR 8547 |
Checklist for this sprint
- [ ] Run the `openssl s_client -groups X25519MLKEM768` test on every public API host.
- [ ] Print the OpenSSL version inside each agent and worker image.
- [ ] Remove hard-coded group lists (`CurvePreferences`, `ecdhCurve`, `ssl_ecdh_curve`) or add the hybrid group to them.
- [ ] Log the negotiated group on outbound provider calls.
- [ ] List every place you sign or verify JWTs, with `alg` and key age.
- [ ] Check each certificate chain for a P-256 CA key before 15 March 2027.
- [ ] Send providers the two questions above and record the answers.
Get your API stack reviewed
If you would like someone to walk the hops with you, AY Automate audits API and agent stacks and turns the findings into a dated migration plan. The Claude Code security audit page explains the scope; to talk first, book a call.
Questions
Keep reading
One API key for many data APIs, without separate sign-ups
One API key for many data APIs: AnyAPI, FetchAPI, upAPI and looot compared on billing, free start and fallback, read 2026-10-23.
The looot team · · 8 min read
Agentic payments: 7 ways an AI agent can pay for an API
Agentic payments in 2026, ranked by setup steps: Stripe Link, x402, MPP, Slash, Ramp, AgentCard and Crossmint, and how each one would pay an API seller.
The looot team · · 10 min read
AI agent tools: the data and APIs an agent needs
The AI agent tools that matter most fetch real data. A plain map of the jobs agents call tools for, and how to connect them without a dozen keys.
The looot team · · 7 min read
Try it with the agent you already use
Start your workspace, top up, and paste one prompt into your agent.