docs.rs failed to build lattice-safe-suite-0.4.3
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
lattice-safe-suite
Post-quantum cryptography suite for Rust — all four NIST PQC standards in one crate.
What's Included
| Crate | Standard | Algorithm | Type | NIST Levels | Version |
|---|---|---|---|---|---|
dilithium-rs |
FIPS 204 | ML-DSA (Dilithium) | Signature | 2, 3, 5 | v0.2.0 |
falcon-rs |
FIPS 206 | FN-DSA (Falcon) | Signature | I, V | v0.2.2 |
lattice-kyber |
FIPS 203 | ML-KEM (Kyber) | KEM | 1, 3, 5 | v0.1.2 |
lattice-slh-dsa |
FIPS 205 | SLH-DSA (SPHINCS+) | Signature | 1, 3, 5 | v0.3.3 |
All implementations are:
- Pure Rust — zero C dependencies,
#![forbid(unsafe_code)] no_std/ WASM ready- NIST KAT validated — bit-for-bit match with C reference
- Security hardened — zeroization, typed safe APIs, fuzz-tested
- SIMD accelerated — AVX2 (x86_64) + NEON (AArch64) for lattice schemes
- 1.4–1.9× faster than C reference implementations
Quick Start
[]
= "0.4"
ML-DSA (FIPS 204) — Digital Signatures
use ;
let kp = generate.unwrap;
let sig = kp.sign.unwrap;
assert!;
FN-DSA (FIPS 206) — Digital Signatures
use *;
let kp = generate.unwrap; // FN-DSA-512
let sig = kp.sign.unwrap;
verify.unwrap;
ML-KEM (FIPS 203) — Key Encapsulation
use ;
use encaps_derand;
let coins = ; // use MlKemKeyPair::generate() with getrandom in production!
let kp = generate_derand;
let enc_coins = ;
let = encaps_derand.unwrap;
let ss_receiver = kp.decaps.unwrap;
assert_eq!;
SLH-DSA (FIPS 205) — Hash-Based Signatures
use ;
use SLH_DSA_SHAKE_128F;
let kp = generate.unwrap;
let sig = kp.sign.unwrap;
assert!;
Feature Flags
| Feature | Default | Description |
|---|---|---|
dilithium |
✅ | ML-DSA (FIPS 204) signatures |
falcon |
✅ | FN-DSA (FIPS 206) signatures |
kyber |
✅ | ML-KEM (FIPS 203) key encapsulation |
slh-dsa |
✅ | SLH-DSA (FIPS 205) hash-based signatures |
serde |
❌ | Serialization for keys and signatures |
simd |
❌ | AVX2/NEON NTT acceleration (ML-DSA + ML-KEM) |
getrandom |
❌ | OS entropy for ML-KEM randomized API |
Use Only One Scheme
# ML-DSA only
= { = "0.4", = false, = ["dilithium"] }
# SLH-DSA only
= { = "0.4", = false, = ["slh-dsa"] }
License
MIT