All insights
·Migration & Engineering·IQCDL

Post-Quantum Identity: JWT, OIDC, SAML and WebAuthn Readiness for ML-DSA

How to assess JWT, OIDC, SAML and WebAuthn for post-quantum risk: what is exposed, token size limits with ML-DSA, and where to start.

Part of the guide: Post-Quantum Migration for Protocols and Infrastructure


Most post-quantum conversations start with TLS, VPNs and PKI. Identity sits one layer above them and is often left out of the inventory, even though a single identity provider signing key can underpin access to every application in an organisation. This article looks at how JSON Web Tokens, OpenID Connect, SAML and WebAuthn are exposed to quantum attack, why the signature sizes in NIST FIPS 204 (ML-DSA) create real engineering friction, and how to sequence the work.

Why identity needs its own post-quantum assessment

Identity systems differ from transport security in three ways that change the planning.

First, they depend on signatures far more than on key exchange. NIST IR 8547 deprecates RSA, ECDSA and EdDSA after 2030 and disallows them after 2035. Those are the algorithms behind RS256, ES256 and EdDSA token signing, SAML XML signatures and most WebAuthn credentials.

Second, the trust anchor is long-lived. An access token may live for ten minutes, but the key that signs it is published through a JWKS endpoint or SAML metadata and may stay in service for months or years. Relying parties trust it. Forging a signature with that key would let an attacker mint any identity.

Third, identity involves many independent consumers. Every API gateway, service provider and mobile client that validates a token must understand the new algorithm before the issuer can switch. This is a coordination problem as much as a cryptographic one, and it is why cryptographic agility matters so much here.

What is actually exposed

Signatures versus confidentiality

The harvest now, decrypt later threat applies to confidentiality. A signed token cannot usefully be forged after it has expired, so short-lived signed tokens carry lower urgency than encrypted data. The risk appears the day a cryptographically relevant quantum computer exists: from that point, anyone could forge signatures made with RSA or elliptic-curve keys that are still trusted.

Encrypted tokens are different. A JWE using RSA-OAEP or ECDH-ES for key management could be recorded today and opened later. So can the TLS sessions that carry bearer tokens if they use classical-only key exchange. Fixing the transport with hybrid key exchange, as described in our guide to X25519MLKEM768 in TLS 1.3, addresses the second case but not the first.

Symmetric mechanisms

HMAC-based tokens (HS256) and symmetric session secrets are not broken by Shor's algorithm. Grover's algorithm gives a quadratic speed-up against brute force, which our post on AES-256 and Grover covers, and a 256-bit secret remains reasonable. The practical weakness of HS256 is operational: every verifier holds the signing secret, which is a poor fit for multi-party federation regardless of quantum risk.

Exposure by mechanism

Mechanism Typical algorithm today Quantum exposure HNDL relevance Main migration constraint
JWS access and ID tokens RS256, ES256, EdDSA Forgery once a CRQC exists Low (short-lived) Token size; verifier library support
JWE encrypted tokens RSA-OAEP, ECDH-ES Recorded ciphertext can be opened High if the payload stays sensitive KEM-based JOSE key management not yet settled
SAML assertions RSA-SHA256 (XML-DSig) Forgery of assertions and metadata Low for assertions; metadata trust is long-lived Redirect binding URL limits; XML-DSig algorithm identifiers
WebAuthn and passkeys ES256, RS256, EdDSA Forgery of assertions; attestation chains Low Authenticator hardware, firmware and transport limits
mTLS client certificates, DPoP proofs ECDSA, RSA Impersonation Low PKI migration (see our PKI post)
HS256 shared secrets HMAC-SHA-256 Reduced margin only None practical Secret distribution, not cryptography

The size problem: a worked example

FIPS 204 defines three ML-DSA parameter sets. ML-DSA-44 has a 1,312-byte public key and a 2,420-byte signature. ML-DSA-65 has a 1,952-byte public key and a 3,309-byte signature. ML-DSA-87 has a 2,592-byte public key and a 4,627-byte signature. An ES256 signature is 64 bytes. An RS256 signature with a 2048-bit key is 256 bytes.

JWS compact serialisation base64url-encodes the signature, which expands it by roughly one third. Consider an illustrative access token with a 600-byte JSON payload (800 characters once encoded) and a short header carrying a key identifier (about 51 characters), delivered in a browser cookie.

  • ES256 token. Header 51 characters, payload 800, signature 86, plus two separators: about 939 characters.
  • ML-DSA-44 token. Header 51 characters, payload 800, signature 3,227, plus two separators: about 4,080 characters.
  • ML-DSA-65 token. The signature alone becomes 4,412 characters, giving a total of about 5,265 characters.

Browsers commonly cap a single cookie at around 4,096 bytes including its name and attributes. The ML-DSA-44 token is already at that limit before the cookie name and attributes are counted, and the ML-DSA-65 token exceeds it by a wide margin. Common web server defaults for a single request header line are around 8 KB, which leaves little room once a gateway adds its own headers or a request carries several tokens. Treat these figures as illustrative rather than as a benchmark: your payload, claims and limits will differ, so measure them.

The same arithmetic affects other places:

  • SAML HTTP-Redirect binding carries the signature in the URL query string, so signature size runs into URL length limits. HTTP-POST binding is more tolerant.
  • Token introspection and logging pipelines that truncate or index fields may break on longer values.
  • WebAuthn sends the assertion signature once per authentication, so size matters less on the wire. Authenticators with constrained memory, firmware and transport limits will still need new hardware or firmware before they can generate or store post-quantum credentials.

There are design responses that avoid enlarging every token. Use opaque reference tokens with server-side introspection for high-volume APIs, keep signed tokens out of cookies, reduce claims, and sign once at the issuer rather than re-signing at each hop. These are architecture choices, so decide them deliberately rather than discovering the limits in production.

Standards and ecosystem status

The cryptographic core is settled. FIPS 204 specifies ML-DSA, and FIPS 205 specifies SLH-DSA, a hash-based alternative with much larger signatures that is rarely practical for tokens. The identity-layer encodings are less settled, and this is where caution is needed.

  • JOSE (RFC 7515 and RFC 7518) and COSE (RFC 9052) need registered algorithm identifiers for ML-DSA before interoperable tokens are possible. At the time of writing these were IETF Internet-Drafts rather than published RFCs. Verify their current status before committing to identifiers with external parties.
  • OpenID Connect Core and OAuth 2.0 do not hard-code one algorithm. They depend on the JOSE registry and on the algorithms an issuer advertises in its discovery document, which is a useful agility point.
  • SAML 2.0 and XML Signature rely on algorithm URIs. Support for post-quantum identifiers is vendor-specific today.
  • WebAuthn uses COSE algorithm identifiers for credential public keys, so its path follows COSE registration and authenticator support.
  • DPoP (RFC 9449) and mTLS-bound tokens inherit their algorithms from JOSE and from your PKI respectively.

The EU PQC roadmap and NIST IR 8547 give the planning horizon. Neither mandates an identity-specific control, so use your own risk assessment to set dates. Our Mosca's Theorem post shows how to turn key lifetimes and migration duration into a deadline.

A practical migration sequence

1. Inventory identity cryptography

Record every signing and encryption key in the identity estate: IdP signing keys, JWKS endpoints, SAML metadata certificates, token encryption keys, client credential methods, passkey algorithm policies and certificate-bound tokens. Capture algorithm, key size, rotation interval, owner and every known verifier. Feed this into your CBOM.

2. Separate urgent from deferrable

Prioritise encrypted tokens and any long-lived signed artefacts first, then federation trust anchors, then short-lived signed tokens. Replace classical-only key exchange on token-carrying connections early, since that is the part exposed to harvesting.

3. Make verifiers algorithm-agnostic

Before issuers change anything, make sure gateways, SDKs and service providers select verification algorithms from key metadata such as the kid and the JWK, and that they enforce an allow-list of acceptable algorithms. Hard-coded RS256 checks are the most common blocker. Never trust the alg value in a token header without checking it against that allow-list.

4. Pilot in a closed domain

Choose an internal service-to-service flow where you control both issuer and verifier. Test token size against cookies, headers, proxies, logging and caches. Run parallel issuers or dual signatures where your tooling supports it, and measure latency and CPU cost on verification.

5. Plan authenticator and federation dependencies

Ask passkey and hardware token suppliers for their post-quantum roadmap and firmware update path. Ask SaaS providers which algorithms their federation endpoints will accept, using the questions in our supplier risk post. Record the answers as dependencies with dates, not as assumptions.

Where IQCDL fits

Identity migration sits across architecture, application and governance teams, which is why it often has no single owner. The IQCDL assessment helps you establish where your team's post-quantum knowledge stands, the IQCDL programmes cover the engineering and governance skills needed to plan work like this, and the IQCDL standards page sets out the NIST, ISO/IEC and EU references the curriculum is built on.

Frequently asked questions

Are JWTs vulnerable to quantum computers?

JWTs signed with RSA or ECDSA (RS256, ES256, EdDSA) could be forged by a cryptographically relevant quantum computer running Shor's algorithm. JWTs signed with HMAC (HS256) rely on a symmetric secret and are not broken by Shor's algorithm. Grover's algorithm only reduces their margin, and a 256-bit key remains adequate.

Is harvest now, decrypt later relevant to identity tokens?

For signed tokens, mostly not, because a signature protects authenticity rather than confidentiality and tokens are short-lived. It is relevant to encrypted tokens (JWE using RSA-OAEP or ECDH-ES), to the TLS sessions that carry tokens, and to any long-lived signed artefact whose trust must hold for years.

Can I use ML-DSA in a JWT today?

Technically yes if your library supports ML-DSA, but interoperability depends on standardised algorithm identifiers. At the time of writing, JOSE and COSE registrations for ML-DSA were IETF work in progress, so check their current status before using them with third parties. Within a closed system you control, pilot behind a feature flag.

What is the first identity task to start now?

Inventory every place identity material is signed or encrypted: IdP signing keys, SAML metadata, JWKS endpoints, token encryption, passkey credential algorithms and client certificates. Record the algorithm, key lifetime and who consumes each one. That inventory is what makes the later algorithm decisions possible.