How to migrate JWT signing keys to post-quantum algorithms

A staged way to move token issuers, JWK Sets and verifiers to ML-DSA signatures without breaking clients, based on RFC 9964 and the library support published as of December 2026.

On this page

How do you migrate JWT signing keys to post-quantum algorithms without breaking existing clients?

The move to post-quantum signatures for JSON Web Tokens is staged: you publish new ML-DSA keys in your JWK Set with their own kid and alg values, update every verifier first, and only then switch your issuers to sign with the new keys. The order matters because RFC 7519 section 7.2 says an application SHOULD reject a JWT whose algorithm it does not find acceptable. A verifier that has not been updated will reject tokens signed with ML-DSA identifiers it does not accept, so switching issuers early breaks clients that were never told about the change. RFC 7517 section 4.5 gives you the mechanism for running old and new keys side by side: kid selects among keys in a JWK Set during rollover, and different keys in the set should use distinct kid values.

The parties affected are token issuers, the teams that publish the JWK Set, and every verifier that checks these tokens, including internal services, partner integrations and third-party libraries you do not control. The defining document for the encoding is RFC 9964, which registers the JOSE alg values ML-DSA-44, ML-DSA-65 and ML-DSA-87 and the key type AKP. The sources listed on this page cover these three parameter sets. An AKP entry differs in shape from an RSA or EC entry, with the algorithm carried in the key itself, so a verifier that parses only RSA and EC keys will not handle it correctly even if the signature check is attempted.

Before you switch any issuer, confirm with each verifier owner that their JWT library accepts AKP keys and the ML-DSA alg values, and that they enforce an allowlist of algorithms as RFC 8725 section 3.1 requires. Ask each library maintainer for the release that adds ML-DSA support, since the sources on this page show support landing in specific releases and you should confirm the version you run. Plan a window in which both the classical and ML-DSA keys are published, and treat the classical key as the fallback until all verifiers have shown they accept the new tokens.

Where JWT signing uses public-key algorithms today

This table lists each JWT touchpoint that carries a public-key signature or key-set entry, the RFC that defines it, and whether post-quantum work changes it. Read it as a map of what to inventory before changing any issuer or verifier. The main takeaway is that signing algorithm choice, key set entries and verifier allow-lists all need to change together, not one at a time.

TouchpointGoverning RFC basisPublic-key use todayTouched by post-quantum work
Issuer signing with RS256RFC 7518 section 3.1 (Recommended), section 3.3 (RSA keys of 2048 bits or larger)RSA PKCS#1 v1.5 signature over SHA-256 with a key of at least 2048 bitsYes
Issuer signing with ES256RFC 7518 section 3.1 (Recommended+), ECDSA with P-256 and SHA-256ECDSA signature on the P-256 curveYes
Verifier checking against JWK Set entriesRFC 7517 section 4 (JWK Set), section 4.4 (alg parameter)Verifier loads the public key from a JWK Set and checks the signatureYes
Key rollover using kidRFC 7517 section 4.5 (kid selects a key within a JWK Set)Verifier picks a key by kid while old and new keys coexist during rolloverYes
Verifier algorithm allow-listRFC 8725 section 3.1 (library must use the caller's supported set only), RFC 7519 section 7.2Verifier rejects any token whose alg it does not accept, so an unupgraded verifier fails on new signaturesYes
Optional encryption path (JWE)RFC 7516 for JWE, key management algorithms registered in RFC 7518Public-key key wrapping for the content encryption key, separate from signingYes
Post-quantum signature identifiers (ML-DSA)RFC 9964 (JOSE registration of ML-DSA-44, ML-DSA-65, ML-DSA-87 with key type AKP)Public-key signature using a key of type AKP, with alg carried in the keyYes
Default recommended set (HS256, RS256, ES256)RFC 7519 section 8 (HS256 required, RS256 and ES256 recommended)RS256 and ES256 are the recommended public-key signing options that most libraries supportNo

What the IETF and NIST have published for ML-DSA in JOSE

The IETF has published the JOSE serialization for ML-DSA, so token issuers and verifiers now have a defined way to name and carry these keys. RFC 9964, ML-DSA for JSON Object Signing and Encryption (JOSE) and CBOR Object Signing and Encryption (COSE), was published in May 2026 as a Proposed Standard, with authors M. Prorock and O. Steele. It registers the JOSE alg values ML-DSA-44, ML-DSA-65 and ML-DSA-87, which correspond to COSE values -48, -49 and -50, and it registers the key type AKP. It registers no crv values, so an ML-DSA key entry in a JWK Set does not look like an RSA or EC entry. Teams should confirm that every verifier in the token path accepts the AKP key type and the new alg values before any issuer starts using them.

The algorithm itself is defined by NIST. FIPS 204, which defines ML-DSA as a set of algorithms for creating and verifying digital signatures, was finalized on 13 August 2024. RFC 9964 is the document that defines its JOSE serialization, so the IETF text depends on FIPS 204 for the algorithm and only describes how the bytes are placed in a JWS. RFC 9964 Table 1 gives the sizes teams need for capacity planning: ML-DSA-65 has a 1952-byte public key and a 3309-byte signature, and the signature is then base64url encoded in the JWS. Those sizes are larger than the RSA and ES256 values most token stacks carry today, so check header and key-set size limits in gateways and clients as well as in the signing service.

Two items are still open. The composite drafts that would pair ML-DSA with a classical signature are not yet RFCs. The JOSE working group draft draft-ietf-jose-pq-composite-sigs-07, dated 23 November 2026, was still an Internet-Draft with no RFC number on 4 December 2026, so any design that depends on a composite alg value is depending on a moving document. On the NIST side, NIST IR 8547, Transition to Post-Quantum Cryptography Standards, was finalized on 27 October 2026 and identifies the quantum-vulnerable standards to be transitioned. Use it as the reference for planning the schedule, and confirm current status of the JOSE drafts on the IETF datatracker before committing to a composite approach.

Which JWT libraries and products support ML-DSA signing today

Two open-source libraries have published ML-DSA support in the sources listed on this page. The first is libjwt, which received an ML-DSA commit on 15 June 2026. The second is jose version 6.2.18, released on 18 November 2026. Both libraries require the alg parameter on AKP keys, which matches RFC 9964's design of carrying the algorithm inside the key itself. Treat these as the starting points for any integration work, and confirm details against each project's own repository before you depend on them.

  • libjwt (15 June 2026): The ML-DSA commit requires alg to be present on every AKP key. A key set that omits it will not be usable for verification under this change.
  • jose 6.2.18 (18 November 2026): The changelog records that AKP keys need alg, the same requirement as libjwt. Check the changelog entry for the exact parameter set names the release accepts.
  • Key shape differences: An AKP entry differs in shape from RSA or EC entries, so a loader written for RSA keys may fail on ML-DSA entries even when the library version is current.
  • Signature size: RFC 9964 Table 1 gives ML-DSA-65 signatures as 3309 bytes before base64url encoding, which is larger than an ES256 signature and affects header and cookie budgets.
  • Scope of the sources: The sources listed on this page do not show support in other libraries.

Before you rely on either library, read its release notes and confirm the supported algorithm names, the key formats it accepts and whether verification is included alongside signing.

What changes in key size, token size and verifier behavior

Moving a JWT signer to ML-DSA changes the key format, the signature length and how verifiers decide what to accept. Each change below affects a different step of the migration, so check them in the order the migration plan runs.

ML-DSA key and signature sizes

RFC 9964 Table 1 gives the public key and signature sizes in bytes: ML-DSA-44 has a 1312-byte public key and a 2420-byte signature, ML-DSA-65 has a 1952-byte key and a 3309-byte signature, and ML-DSA-87 has a 2592-byte key and a 4627-byte signature. In a JWS, the signature bytes are base64url encoded, so the token grows by roughly a third more than the raw signature length. Check that header size limits, cookie limits and proxy buffers can hold the larger token before you change the signer.

ML-DSA-65 signature
3309 bytes
RFC 9964 text

AKP key shape in JWK Sets

RFC 9964 defines the AKP key type for ML-DSA keys, and an AKP entry does not look like an RSA or EC entry. The alg value is carried in the key, and priv holds a 32-byte seed instead of a full expanded private key. Any tooling that parses JWK Sets and assumes kty values of RSA or EC will fail on AKP entries, so test your key publishing and rotation scripts against an AKP key before you publish one.

RFC 9964 text

Verifiers reject unknown algorithms

RFC 7519 section 7.2 says an application should reject a JWT whose algorithm it does not find acceptable. A verifier that has not been updated to accept an ML-DSA identifier will therefore reject tokens signed with it, and it will do so as a normal validation failure, not as an error you can see in the issuer. Update and test each verifier before the issuer begins signing with the new algorithm, and keep the old signing path available until every verifier has passed.

RFC 7519 text

Nested JWT handling under cty

Step 8 of RFC 7519 section 7.2 says that when the cty header is JWT, the payload is itself a JWT and validation restarts at step 1. If your migration wraps a post-quantum signed token inside another token, or the reverse, each layer is validated on its own algorithm. Confirm that the verifier handles nested tokens and that the outer and inner algorithms are both on its accept list, because a failure at either layer rejects the whole token.

RFC 7519 text

One algorithm per key

RFC 8725 section 3.1 says that each key must be used with exactly one algorithm, and that libraries must let the caller specify the supported set of algorithms and must not use any others. An ML-DSA key therefore should not be reused for ECDSA or RSA signing, and a single JWK Set should keep ML-DSA keys separate from classical keys, each with its own kid. Review your key inventory for any key that is already shared across algorithms before you add post-quantum keys to it.

RFC 8725 text

What order should a JWT post-quantum migration follow?

The sequence moves verifiers ahead of issuers and keeps classical keys live until clients are confirmed, so tokens keep validating at every stage. The sources do not set a timeline, so the pace of each step is a decision your team makes from its own client inventory.

  1. Inventory issuers, verifiers and JWK Sets

    Start by listing every service that signs tokens (issuers), every service that checks them (verifiers), and every JWK Set endpoint they fetch keys from. For each, record the algorithms currently accepted, the key types published, and the libraries in use. This inventory is the baseline for every later step, and it is done when each issuer, verifier and key set has an owner and a recorded configuration. RFC 7519 section 7.2 says an application should reject a JWT whose algorithm it does not find acceptable, so an accurate list of accepted algorithms in each verifier is what prevents surprise rejections later.

  2. Confirm each verifier library accepts ML-DSA and AKP keys

    For each verifier library, check whether it accepts the ML-DSA algorithm you plan to use and the AKP key type defined for ML-DSA keys. RFC 9964 defines the AKP key type and registers the "alg" values ML-DSA-44, ML-DSA-65 and ML-DSA-87, and the ML-DSA entry differs in shape from RSA or EC entries, so a library that only parses those types will not handle it. The libjwt commit of 15 June 2026 and jose 6.2.18 of 18 November 2026 both require "alg" on AKP keys. Confirm the exact version you run, because support is recorded per release. This step is done when each library has been tested against a sample AKP key and its result is written down.

  3. Publish ML-DSA keys with distinct kid values

    Add ML-DSA public keys to the JWK Set alongside the existing classical keys. RFC 7517 section 4.5 says "kid" is used to choose among keys during key rollover, and that different keys in a JWK Set should use distinct "kid" values, so give each ML-DSA key its own identifier that cannot be confused with a classical key. Publish only the public part; RFC 9964 section 7.1 says the ML-DSA seed and expanded private key must be protected equally, since either lets an attacker forge signatures. This step is done when the JWK Set serves both classical and ML-DSA entries and each has a unique "kid".

  4. Update verifiers first and test rejection behavior

    Upgrade the verifiers before any issuer starts signing with ML-DSA, so every service that checks tokens can already read the new algorithm. RFC 8725 section 3.1 says libraries must let the caller specify the supported algorithm set and must not use any others, and that each key must be used with exactly one algorithm. Test the behavior deliberately: send a token signed with an unlisted algorithm and confirm it is rejected, and send a token with a known ML-DSA signature and confirm it validates. This step is done when verifiers accept the intended algorithms, reject everything else, and the test results are saved.

  5. Switch issuers to ML-DSA on a rollout plan

    Move issuers to ML-DSA in stages, following the rollout plan your team writes for its own environment. RFC 8725 section 3.2 says applications must be designed for cryptographic agility, so each issuer should be configured to select its algorithm from settings rather than hardcoded values, which makes the switch and any rollback a configuration change. Watch for consumers that parse tokens with older libraries, since those are the likeliest to fail. This step is done when each issuer signs with ML-DSA according to the plan and the verifiers confirm the tokens they receive.

  6. Retire classical keys only after clients are confirmed

    Keep classical keys in the JWK Set until you have confirmed that every client that needs to verify tokens can handle ML-DSA. Only then remove the classical entries and stop issuing classically signed tokens. The sources do not set a timeline for this, so the pace is a decision based on your client inventory from the first step, not a date. RFC 7519 section 8 requires only HS256 and none for conforming implementations, and recommends RS256 and ES256 as supported, so confirm each client's real algorithm support before removing any key it depends on. This step is done when a confirmed client list exists and no remaining client needs a classical key.

  7. Record the change in your configuration log

    Write down what changed: which issuers, verifiers and key sets were moved, which algorithm and kid values were used, which library versions were tested, and the test results. Include the date of each change and the owner who approved it. Record any classical keys that were retired and the client confirmation behind that decision. This record is what your auditors, security reviewers and the next team member will rely on, and the step is done when the log is complete and stored where your change management process keeps such records.

How a token moves through issuer, JWK Set and verifier during rollover

The flow starts at the issuer, which signs each new token with the ML-DSA key and writes the matching kid into the token header. The JWK Set publishes both the old and new keys side by side, each under its own kid, so verifiers can find either one during the transition. The verifier reads the kid, selects the matching key, and checks the alg value against its allowed list before accepting the token. Check that every verifier can parse AKP key entries and that no key shares a kid with another. RFC 7517 section 4.5 covers the kid rule, and RFC 8725 section 3.1 covers the allowed-list rule.

Issuer signs with the new key, and the verifier selects the key by kid and checks alg before accepting.

Which risks in a JWT key migration do the sources name?

The sources name a small set of concrete risks that show up when JWT signing keys move to ML-DSA. Most come from verifiers and key handling rather than from the signature math itself, so each one needs a check in your own token flow before cutover.

Unupdated verifiers reject new identifiers

RFC 7519 section 7.2 says an application should reject a JWT whose algorithm it does not find acceptable. A verifier that has not been updated will therefore reject tokens signed with ML-DSA identifiers it does not accept, even when the issuer is correct. Before you switch an issuer, confirm that every verifier, gateway and downstream service that checks these tokens accepts the new "alg" values, and plan the rollout so verifiers update first.

RFC 7519 text

Seed and expanded key need equal protection

RFC 9964 section 7.1 says the ML-DSA seed and the expanded private key must be protected equally, because either one lets an attacker forge signatures. Storage, backup and access policies that were written for a single RSA or EC private key may cover only one of these forms. Check where each form is kept, who can read it, and whether backups and key-management exports carry both.

RFC 9964 text

Algorithm confusion from loose verifiers

RFC 8725 says libraries must let the caller specify the supported set of algorithms and must not use any others, and that each key must be used with exactly one algorithm. A verifier that accepts whatever "alg" a token header names can be tricked into checking a signature with the wrong algorithm for a key. When you add ML-DSA keys, pin each key to its expected algorithm in verifier configuration and reject all other values.

RFC 8725 text

Composite drafts are not yet an RFC

draft-ietf-jose-pq-composite-sigs-07, dated 23 November 2026, pairs ML-DSA with ECDSA or EdDSA, and it remained an Internet-Draft with no RFC number on 4 December 2026. A design that depends on a composite signature format is therefore built on a document that can still change. Track the draft status and avoid hard-coding its identifiers into production verifiers until it is published.

Draft status page

ML-DSA key shape breaks RSA and EC code

RFC 9964 defines the AKP key type for ML-DSA, with the "alg" value carried in the key and "priv" holding a 32-byte seed. This layout differs from the RSA and EC entries that much JWK handling code expects, so parsers that branch on "kty" values or assume fixed fields can fail. Review every place your code reads, generates or rotates JWK entries, and test key import and export before issuing ML-DSA tokens.

Seed length in "priv"
32 bytes
RFC 9964 text

What is still unsettled for ML-DSA in JWT

The composite signature work is the main open question for JWT. The IETF JOSE working group draft draft-ietf-jose-pq-composite-sigs pairs ML-DSA with ECDSA or EdDSA, and the draft was at version 07 on 23 November 2026. On 4 December 2026 it was still an Internet-Draft with no RFC number, so no composite identifier should be treated as a stable standard. The sources do not establish whether ML-DSA-only or hybrid signatures will become the default for JWT issuers, so teams should not assume either outcome. Plan for both shapes, and confirm which one your verifiers and clients will accept before you choose an identifier for production tokens.

The product side is also moving without fixed dates. The PostQuantum.Jwt NuGet package states that its signatures use ML-DSA-65 alone with no classical co-signature, while its optional encryption path combines X25519 and ML-KEM-768. The Nimbus JOSE+JWT roadmap post of 17 December 2025 expects a long transition period in which classical, hybrid and post-quantum primitives coexist, but the roadmap does not fix dates for that period. Treat a coexistence window as open-ended and budget for supporting two or more signing algorithms in your key sets at once, which means kid values and alg fields must stay unambiguous through the rollover.

Watch two places for changes. Follow draft-ietf-jose-pq-composite-sigs on the IETF datatracker for working group decisions and any move toward RFC status. Follow the release notes of each JWT library you depend on, such as the panva jose changelog and the libjwt commits that add ML-DSA support, since a library release is what actually lets a verifier accept a new alg value. Record the version you tested against, because a verifier that has not been updated will reject tokens signed with identifiers it does not accept.

What do teams ask about migrating JWT keys to post-quantum?

Do we need to migrate our JWT signing keys to post-quantum algorithms right now?

The sources in this topic do not set a deadline for JWT signing keys, so whether to start now is a planning decision for your team. NIST published the final NIST IR 8547, "Transition to Post-Quantum Cryptography Standards", on 27 October 2026, and it identifies the quantum-vulnerable standards to transition away from. Use that document as the reference for your migration plan, and check your own risk profile, including how long your tokens and the data they protect must stay trustworthy. Starting with an inventory of your issuers, verifiers and key sets is useful whatever the timing turns out to be. NIST IR 8547

Do existing RS256 or ES256 tokens have to change?

Existing tokens do not change by themselves. RS256 and ES256 are classical algorithms, and tokens already issued under them remain valid until they expire or are revoked. The change happens when you issue new tokens. RFC 7518 lists RS256 as Recommended and ES256 as Recommended+, and RFC 7519 recommends that implementations support both. A post-quantum move therefore means adding new signing keys and new algorithm identifiers alongside the current ones, then retiring the classical keys when your verifiers no longer need them. Confirm the exact rollout order with your token lifetimes and client mix.

How do we add ML-DSA keys without downtime?

The safest pattern is to add the new key before you sign with it. RFC 7517 says the "kid" parameter selects among keys during rollover, and that different keys in a JWK Set should use distinct "kid" values. Publish the ML-DSA public key in your JWK Set first, and make sure every verifier can read it. Only after verifiers are updated should the issuer start signing with ML-DSA. RFC 9964 defines the AKP key type for ML-DSA, and its public key and signature sizes are larger than RSA or EC, so check that your token size and header limits still work. Keep the classical key in the set until the old tokens have expired. Test the sequence in a staging environment first.

Will an older JWT verifier reject tokens signed with ML-DSA?

It can. RFC 7519 section 7.2 says an application should reject a JWT whose algorithm it does not find acceptable, so a verifier that has not been updated may refuse tokens signed with ML-DSA identifiers it does not recognize. This is the reason to upgrade verifiers before issuers start signing with the new algorithm. RFC 8725 says libraries must let the caller specify the supported set of algorithms and must not use others, so your verifier configuration should list ML-DSA explicitly once it is ready. Test each verifier you run, including any that sit in other teams or in customer systems.

What should we ask a JWT library vendor about alg and AKP support?

Ask whether the library accepts the "alg" values registered in RFC 9964, which are "ML-DSA-44", "ML-DSA-65" and "ML-DSA-87", and whether it handles the "AKP" key type. Confirm that it requires "alg" on AKP keys, as libjwt and jose do in the versions noted in the sources. Ask which version adds support and whether signing and verification both work. Ask whether the library supports composite signatures, since draft-ietf-jose-pq-composite-sigs-07 was still an Internet-Draft with no RFC number on 4 December 2026. Ask how the library restricts accepted algorithms per key, because RFC 8725 says each key should be used with exactly one algorithm. Get the answers in writing for the exact version you run.

Should we migrate JWT keys in-house or with outside help?

The sources do not say which approach suits your organization, so the decision depends on your team's capacity and the size of your token estate. An in-house team needs to inventory issuers, verifiers and key sets, confirm library support, plan the staged rollout and test each verifier. Outside help can cover the same work under a written, fixed scope with agreed deliverables and a timeline. DeployOpen plans, implements, hardens and documents self-hosted platforms in the client's own infrastructure, and runs security testing, which can include reviewing a token flow before and after the change. Ask any provider for a written scope, deliverables, who holds responsibility for each verifier, and how retesting is handled. Quotes follow from that scope.

How much larger are ML-DSA signatures in a JWT?

Larger, and the sizes matter for your headers and token budgets. RFC 9964 Table 1 gives the sizes in bytes. ML-DSA-44 has a 1312-byte public key and a 2420-byte signature. ML-DSA-65 has a 1952-byte public key and a 3309-byte signature. ML-DSA-87 has a 2592-byte public key and a 4627-byte signature. In JWS, the signature bytes are then base64url encoded, which adds further length. Check the maximum header and cookie sizes at your gateways, load balancers and browsers before issuing ML-DSA tokens, and test with the parameter set you plan to use.

Does the PostQuantum.Jwt package give us a hybrid signature?

The sources say it does not for signatures. The NuGet package PostQuantum.Jwt states that its signatures use ML-DSA-65 alone, with no classical co-signature. Its optional encryption path combines X25519 and ML-KEM-768. If your design needs a classical signature alongside ML-DSA, the sources point to draft-ietf-jose-pq-composite-sigs-07 as the JOSE working group draft, which remained an Internet-Draft on 4 December 2026. Confirm the signing behavior of any package you evaluate by reading its documentation and testing it, and do not assume a hybrid signature from its name or description.

How DeployOpen works on this

DeployOpen plans and tests the move of JWT signing keys to post-quantum algorithms inside your own infrastructure. We start from your current issuers, key sets and verifiers, stage the change so existing clients keep working, and hand over tested configuration with documentation your team can run. Engagements are fixed-scope, with the scope agreed in writing before work starts.

How we scope

  • We inventory token issuers, JWK Sets, verifiers and the libraries each service uses for JWT signing and verification.
  • We record which "alg" values each verifier accepts today, since RFC 7519 has verifiers reject algorithms they do not find acceptable.
  • The written scope defines which services, key sets and client types are covered, and which are left for a later phase.

How we build

  • We stage new keys alongside existing ones, using distinct "kid" values so verifiers can select the right key during rollover, per RFC 7517.
  • We check each library against the ML-DSA key shape defined in RFC 9964 (AKP key type, "alg" required) before changing any issuer.
  • We test hybrid and single-algorithm configurations in a non-production environment, confirming that unupdated verifiers fail in a controlled way.

How we hand over

  • We deliver the tested issuer, key set and verifier configuration, with the steps used to roll keys forward and back.
  • We document which signing and verification paths were tested, the library versions used, and the results of each test case.
  • We hand over the key storage and access controls for the new keys, and confirm the seed and expanded private key are protected equally.

How we support

  • Ongoing support and upgrades are available as a retainer, for example when libraries add or change ML-DSA identifiers.
  • We can retest verifiers after library upgrades, since the sources note that standards and library support are still moving.
  • Confirm with your library vendors which versions support the algorithms you plan to use before scheduling a retainer.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.