← Lab /Software

Python’s main crypto library now ships ML-KEM and ML-DSA via pip

The pyca/cryptography package now provides post-quantum ML-KEM and ML-DSA primitives for Python developers.

Software Trail of Bits 30 Jun 2026 Tooling Deployed evidence

Published as “Shipping post-quantum cryptography to Python”

Why it matters

Python developers can now use NIST-standard post-quantum primitives, accelerating ecosystem-wide migration toward quantum-resistant cryptography.

Summary

The team added Rust bindings for the NIST-standard ML-KEM key-encapsulation mechanism and ML-DSA digital-signature scheme to the pyca/cryptography library and released them in version 48, which can be installed with a single pip command. The release also includes a cross-binding API, tests, and optional support for the AWS-LC backend. While the primitives are functional, the authors note that their larger key and signature sizes and slower performance mean they are not a drop-in replacement for existing algorithms and will require protocol-level changes. Evidence consists of the library release notes and download statistics showing the package’s widespread use.

What they found 1

  1. Version 48 includes Rust bindings for ML-KEM and ML-DSA

    “The version 48 release includes our Rust bindings for ML-KEM and ML-DSA, the cross binding API and tests, and support for AWS-LC as a cryptographic backend.”

Caveats 5

  • The post-quantum migration involves more than a primitive swap because public keys, signatures, and ciphertexts are often 1-2 orders of magnitude larger than classical values.
  • Larger key, signature, and ciphertext sizes may require changes to wire formats and protocols
  • Performance is slower than classical algorithms, though still acceptable for regular use
  • SLH-DSA is not yet supported in the current release
  • Full protocol integration of the new primitives is still in progress

What’s new here 4

  • Rust bindings for ML-KEM and ML-DSA added to pyca/cryptography
  • Cross-binding API and test suite for the new primitives
  • Optional support for AWS-LC as a cryptographic backend
  • Availability via pip starting with cryptography>=48

In the news