PQ Python

jwcrypto

The only released Python JOSE library with RFC 9964 ML-DSA JWTs, given a cryptography ≥48 backend.

PyPI
jwcrypto
Version cited
1.6.32 Dec 2026
Downloads
19M/mo

Key exchange and encryption

Unknown

PQ JWE not reported

Signatures and identity

PQ with action

ML-DSA since 1.5.9; needs cryptography ≥48

What to do

Use it for ML-DSA JWTs today: upgrade to 1.6.3, pin cryptography ≥48 yourself, send tokens in Authorization headers rather than cookies, and test interop with every verifier.

Since 1 Dec 2026 1.6.3 (2 Dec 2026) fixes DoS CVE-2026-142105, unrelated to the advisory.

Details

jwcrypto is the least ergonomic of the Python JOSE libraries, but the only one found with released ML-DSA. It has 19,043,567 downloads in 30 days.

  • ML-DSA. RFC 9964 ML-DSA-44/65/87 with AKP keys since 1.5.9 (PR #384), needing cryptography>=48; made optional in 1.6.2 (jwcrypto releases, JWCrypto 1.6.3 jwa.py).
  • Declared floor. cryptography>=39.0.0, so an environment can resolve to a version without ML-DSA. Pin cryptography>=48 yourself.
  • Other algorithms. Caller-chosen; ES384 and RSA-3072 stopgaps work; Ed25519/Ed448 since 1.5.7.
  • Mixed JWKS. Skips unknown kty values (#388), per the AGY report.
  • 1.6.3 is a DoS fix (CVE-2026-142105), unrelated to the advisory.
  • Downstream. django-oauth-toolkit 3.4.1 depends on jwcrypto>=1.5.0 but hardcodes RS256 and HS256 (auth frameworks).
  • Cost. An ML-DSA-65 token adds 4,326 B to every request ASTRA and needs a wider column wherever tokens are stored (wire cost, storage).

Test result (ASTRA report)#

In an isolated environment with cryptography 51.0.0, the ASTRA researchers signed and verified a synthetic compact JWS with a public AKP key for ML-DSA-44, -65 and -87. The signature segment alone was 3,227 / 4,412 / 6,170 characters. This was a same-library round trip, not a cross-vendor interoperability or OIDC certification test.

The AGY report’s signing and verification code (jwk.JWK.generate(kty="AKP", alg="ML-DSA-65"), about 4.8 KB serialized) is on the FastAPI page; token-size limits are under token sizes.

Sources cited on this page 3
  1. PR #384 github.com
  2. jwcrypto releases github.com
  3. JWCrypto 1.6.3 jwa.py github.com

All sources across the guide