Creuto is now an OpenAI Select Partner Read More
Post-quantum JWT is standard under RFC 9964, but one ML-DSA-65 signature is 3,309 bytes. What breaks in cookies and gateways, and which libraries sign today.

Post-quantum JWT signing has had a standard since 19 May 2026, when RFC 9964 registered ML-DSA for JOSE. The catch is size: an ML-DSA-65 signature is 3,309 bytes, against 64 bytes for ES256. By the end you will know what that breaks in cookies, headers and gateways, which libraries can sign today, and what to change this quarter.
The short version: for most API teams this is a header-budget and verifier-inventory problem before it is a cryptography problem. The urgency is real but lower than for TLS key exchange, and that buys you time to measure before you migrate.
| Fact | Detail (as of 4 December 2026) |
|---|---|
| Standard | RFC 9964, Proposed Standard, published 19 May 2026 |
| JOSE algorithm names | ML-DSA-44, ML-DSA-65, ML-DSA-87; new key type AKP |
| Signature sizes | 2,420 / 3,309 / 4,627 bytes, before base64url |
| Hybrid option | draft-ietf-jose-pq-composite-sigs, still an Internet-Draft (-07, 23 November 2026) |
| Who is affected | Anyone issuing JWTs that travel in cookies or Authorization headers through proxies and gateways |
RFC 9964 is a Proposed Standard that maps ML-DSA, the lattice signature scheme in NIST FIPS 204, onto JOSE and COSE. It registers three alg values, ML-DSA-44, ML-DSA-65 and ML-DSA-87, and lists each with a JOSE implementation requirement of "Optional". Nothing obliges a library to ship them.
The RFC also defines a new JWK key type, Algorithm Key Pair (AKP), with a required alg, a pub parameter for the public key and a priv parameter that must be the 32-byte seed rather than the expanded private key. The ctx parameter must be the empty string, and the pre-hashed HashML-DSA variant is deliberately not supported. If your JWKS tooling assumes every key is RSA, EC or OKP, that assumption breaks here first.
An ML-DSA-65 JWT carries a signature of 3,309 bytes, which becomes 4,412 characters once it is base64url-encoded, because JWS uses base64url without padding and that encoding spends four characters on every three bytes. An ES256 signature is a 64-byte R || S value per RFC 7518, or 86 characters. The sizes below come from Table 1 of RFC 9964; the character counts are our arithmetic.
| Algorithm | Signature (bytes) | Signature in a JWT (chars) | Public key (bytes) |
|---|---|---|---|
| ES256 | 64 | 86 | 65 (P-256) |
| ML-DSA-44 | 2,420 | 3,227 | 1,312 |
| ML-DSA-65 | 3,309 | 4,412 | 1,952 |
| ML-DSA-87 | 4,627 | 6,170 | 2,592 |
We checked this against the RFC's own examples. The ML-DSA-65 compact JWS in Appendix A.1 signs a 56-byte sentence and is 4,584 characters long end to end. A real access token with iss, sub, aud, scopes and a kid will be longer still.
The authors say as much. RFC 9964 warns that "ML-DSA may not be suitable for use cases requiring small keys or signatures" and points to JWK thumbprints as a way to avoid repeating public keys. A bearer token sent on every request is close to the textbook case of needing a small signature.
A post-quantum JWT breaks first wherever something in the request path has a fixed size budget. These are the limits we could verify in primary documentation:
| Component | Documented limit | What happens with ML-DSA-65 |
|---|---|---|
| Browser cookie | RFC 6265: user agents should support at least 4,096 bytes per cookie, counting name, value and attributes | The 4,412-character signature alone exceeds the guaranteed minimum |
| nginx | large_client_header_buffers 4 8k by default; a header field larger than one buffer returns 400 | Fits under 8K today; ML-DSA-87 plus claims starts to crowd it |
| Node.js | --max-http-header-size defaults to 16 KiB for all headers | One token can now use over a quarter of the budget |
| AWS Application Load Balancer | 16K per header, 64K for the entire request header | Fits, with less headroom for cookies sent alongside |
| AWS KMS signing | RAW messages limited to 4,096 bytes; larger inputs need EXTERNAL_MU | Signing inputs over 4KB must take the EXTERNAL_MU path |
The cookie row is the one that bites web apps. If you keep a session JWT in a cookie, ML-DSA-65 will not fit inside the size every browser is required to support, and splitting tokens across cookies adds parsing code you then have to secure.
The gateway rows bite partner integrations, because you do not control their proxies. An 8K header buffer is a default, not a ceiling, but every hop between the client and your verifier has its own default, and you only learn which one is lowest when a request fails with a 400 that never reaches your logs.
JWKS documents grow too. An ML-DSA-65 pub value is 2,603 characters base64url-encoded, and during a key rotation you publish two of them. That rarely breaks anything, but it matters if verifiers fetch JWKS on cold start in a serverless function.
Only one of the five mainstream JWT libraries we checked ships ML-DSA in a release. We read each project's changelog, releases and issue tracker rather than relying on README summaries.
| Library | Status | Evidence |
|---|---|---|
| panva/jose (JavaScript) | Shipped | v6.1.0 (27 August 2025) added the ML-DSA identifiers and AKP thumbprints; the pull request notes Node.js 24.7.0 or later, and the browser runtime table lists Chromium 155 or later |
| jsonwebtoken (Node.js) | No support | The supported algorithms list stops at ES512; we found no ML-DSA issue or pull request |
| PyJWT | Pull request open | Latest release 2.15.1 has no ML-DSA entry; PR #1256, opened 20 November 2026, adds it using cryptography 48.0.0 |
| golang-jwt | Pull request open | v5.4.0 (30 November 2026) has none; PR #561 adds the methods behind Go 1.27 build tags using the standard library's crypto/mldsa |
| Nimbus JOSE+JWT (Java) | No support | The changelog through 10.11 (27 November 2026) and the unreleased 11.0 entry never mention ML-DSA or AKP |
On the signing side, AWS KMS offers ML_DSA_44, ML_DSA_65 and ML_DSA_87 key specs with the ML_DSA_SHAKE_256 signing algorithm, and AWS's own walkthrough builds an ML-DSA-65 JWT by hand with the CLI.
The verifier side is what decides your timeline. A token is only as post-quantum as the slowest service that has to verify it, so one Java microservice on Nimbus or one Node service on jsonwebtoken holds the whole issuer back. In API integration work the issuer is typically one codebase while the verifiers are spread across teams, languages and partners, so the inventory takes longer than the signing change.
Composite signatures pair ML-DSA with ECDSA or EdDSA so that, in the words of draft-ietf-jose-pq-composite-sigs, you keep security "as long as at least one of the traditional or post-quantum components remains secure". That is a reasonable hedge for a lattice scheme with less field history than elliptic curves.
The draft is still moving under you. Revision -06, dated 20 October 2026, listed seven JOSE algorithms. Revision -07, dated 23 November 2026, lists five, having dropped ML-DSA-65-Ed25519 and ML-DSA-87-Ed448. An alg name you hard-code into a partner contract today may not exist in the final RFC.
Composites also do nothing for size. The ECDSA P-256 component the draft specifies is a DER signature of up to 72 bytes, added on top of the full ML-DSA signature. If your problem is the 4KB cookie, a composite makes it slightly worse.
A quantum-safe JWT matters less urgently than quantum-safe encryption, because harvest-now-decrypt-later does not work against signatures. Cloudflare's 3 December 2026 roadmap puts it plainly: "Authentication is different. Breaking it in the future doesn't expose conversations that have already happened." An access token that expired in 2026 cannot be usefully forged in 2035.
The strongest counter-argument deserves its full weight. Your verification keys are public by design, sitting in a JWKS endpoint. On the day someone can break ECDSA, they can derive your signing key from that endpoint and mint valid tokens for any user. Cloudflare's own framing concedes the deadline: authentication "could come second, as long as it was done before anyone could break it". Its timeline commits to post-quantum JWT tokens on internal and customer-facing interfaces by Q2 2027.
So the honest position is: migrate before the threat, not after, but you are not behind if your access tokens still use ES256 today. Long-lived signed artefacts are the exception, such as ID tokens kept as audit evidence or signed documents with a legal shelf life; treat them like encrypted data. If you have not mapped where these live, a cryptographic inventory is the place to start.
Migrating API tokens to post-quantum signatures starts with work that is useful even if you never switch algorithms:
alg on every verifier. Each verify call should accept an explicit allowlist, never whatever the token header claims. Adding ML-DSA-44 later should be a config change on that list, not a code change.Authorization and Cookie headers at the edge, take the 99th percentile, and add about 4,400 characters. Then find the lowest limit between client and verifier, including partner proxies.kid, publish old and new keys together, and time how long verifiers take to pick up the change. The same discipline applies to any signing key, as our rotation plan for a compromised signing key sets out.This is the wrong project to start if your tokens never leave a private network and every verifier is one codebase you control; there, wait for your library and switch in a single release. It is the right one if partners, mobile apps and third-party gateways sit between your issuer and your verifiers.
JWT with role-based access control is the auth layer we build into the Node.js backends we ship, and we have not yet run ML-DSA tokens in production for a client. What we can do is the groundwork this post describes: map every issuer, verifier, proxy and header limit in your token path, then sequence the move so no partner integration finds out with a 400. If your platform issues tokens to mobile apps and partners and you want that map drawn before you commit to an algorithm, our API development and integrations team can audit the path and plan the migration with you.
JWTs signed with RS256 or ES256 are not quantum safe, because a large quantum computer could derive the signing key from the public JWKS. Signatures are less urgent than encryption, though: an expired access token cannot be usefully forged later, so the goal is to migrate before such a machine exists.
An ML-DSA-65 JWT signature is 3,309 bytes, or 4,412 base64url characters, compared with 86 characters for ES256. RFC 9964's own ML-DSA-65 example token, signing a 56-byte sentence, is 4,584 characters, and real access tokens with claims will be longer than that.
RFC 9964 is the IETF Proposed Standard, published on 19 May 2026, that defines how to use the ML-DSA post-quantum signature algorithm from NIST FIPS 204 in JOSE and COSE. It registers ML-DSA-44, ML-DSA-65 and ML-DSA-87 and adds a new AKP key type for JWKs.
As of December 2026, panva/jose is the only mainstream JWT library with ML-DSA in a release, since v6.1.0. PyJWT and golang-jwt have open pull requests, while jsonwebtoken for Node.js and Nimbus JOSE+JWT for Java show no ML-DSA support in their releases or changelogs.
Composite ML-DSA plus ECDSA signatures are not ready for production JWTs. The IETF composite draft is still changing, and revision -07 dropped two algorithms that -06 listed. Composites also add a classical signature on top of the full ML-DSA one, so they make token size slightly worse.
An ML-DSA-65 JWT will usually not fit in a single cookie, because RFC 6265 only requires browsers to support 4,096 bytes per cookie and the encoded signature alone is 4,412 characters. Store an opaque session reference in the cookie and keep the signed token on the server or gateway.
Ready to take the first step towards unlocking opportunities, realizing goals, and embracing innovation? We're here and eager to connect.