r/rust • • 16d ago

Which Rust crypto crates support post-quantum algorithms? (rustls, aws-lc-rs, ring, RustCrypto, libcrux, …)

I put together a sourced catalog of post-quantum support across crypto libraries, including the main Rust crates: https://pqcdeps.com/catalog?eco=rust

Short version for Rust:

- rustls offers hybrid X25519MLKEM768 by default with the aws-lc-rs provider (0.23.22+), and prefers it since 0.23.27.

- aws-lc-rs has ML-KEM (1.12.0+) and ML-DSA (1.18.0+).

- RustCrypto has ml-kem, ml-dsa and slh-dsa crates; libcrux has formally verified ML-KEM/ML-DSA.

- ring has no PQ algorithms and no public plan (the maintainer's Kyber proposal was closed), so if PQ matters to you, check whether ring sits under your TLS stack.

You can paste a Cargo.lock into https://pqcdeps.com/check and it's parsed in your browser. Each claim links to the release note or changelog it's based on; corrections welcome on GitHub. It's free and non-commercial.

4 Upvotes

6 comments sorted by

2

u/Darkhonour 13d ago

I created a crate library to help folks meet their compliance requirements when using the aws-lc-rs and rustls libraries. I have several projects where FIPS-validated is a requirement and I didn’t have a reliable way to pin the AWS-LC 3.x chain after rustls moved on. The 4.x libraries were just approved 2 days ago and the 5.x libraries are in review now.

Check it out if it fits your use case: https://crates.io/crates/crypto-profile

1

u/insanitybit2 11d ago

Would recommend ring. FIPS certified (including ML-DSA, as of the other day), haven't had any issues, partially formally verified, the devs are extremely nice and competent.

FIPS sucks but tbh at this point I just stuck to FIPS algorithms almost exclusively

1

u/shegeshe 5d ago

great catalog, having a clear matrix of which crates actually ship FIPS-finalized ML-KEM and ML-DSA vs. older draft specs saves a ton of trial and error.

From building a Rust P2P node stack using hybrid X25519 + ML-KEM-768 on transport and ML-DSA-65 for message/transaction signing, a few practical gotchas stood out across those crates:

  1. Transport vs. signatures live in different ecosystems right now: rustls backed by aws-lc-rs gives you turnkey hybrid X25519MLKEM768 out of the box (including over QUIC via quinn), whereas if you want pure-Rust or no_std ML-DSA-65 (FIPS 204) and ML-KEM-768 (FIPS 203), the RustCrypto ml-dsa / ml-kem crates and Cryspen's libcrux (formally verified via Hax/F*) are much easier to audit and cross-compile to mobile targets (iOS/Android) without wrestling with CMake or OpenSSL/AWS-LC cross-compilation toolchains.
  2. Watch draft vs. final OIDs and domain separation: Some older Dilithium3 crates on crates.io still implement Round 3 parameters rather than final FIPS 204 ML-DSA-65 (which added the context string prefix and specific domain separation). Double-checking KAT (Known Answer Test) vectors against NIST's final FIPS 204 test suite before locking wire formats is essential.
  3. Buffer sizing on the hot path: With ML-DSA-65 public keys at 1,952 bytes and signatures at 3,309 bytes, pre-allocating framing buffers and keeping signature verification offloaded to a bounded worker pool keeps async I/O reactors smooth under bursty P2P traffic.

1

u/[deleted] 12d ago

[removed] — view removed comment

1

u/jonyplayz69 9d ago

Thanks! A CLI / GitHub Action is next on my list. The plan is that it uses the same parser as the site, runs locally (nothing uploaded), and fails the build if a new dependency is "no plan" or downgrades your PQC status, with a threshold you can configure. Which lockfiles do you use? That'd tell me what to support first.