latticearc
Post-quantum cryptography for Rust. Implements all four NIST PQC standards (FIPS 203–206) behind a use-case-driven API — describe what you're protecting, the library picks the algorithm, security level, and compliance mode. Hybrid (PQ + classical) by default; PQ-only mode for CNSA 2.0.
Install
[]
= "0.9"
Requires Rust 1.93+ and a C/C++ compiler. For FIPS-validated routing also CMake + Go (--features fips).
Quick Start
use ;
let = generate_hybrid_keypair?;
let encrypted = encrypt?;
let decrypted = decrypt?;
// ML-KEM-768 + X25519 + HKDF-SHA256 + AES-256-GCM — selected automatically
CLI
A companion command-line tool — latticearc-cli — exposes the same library so ops and CI workflows can use PQ crypto without writing Rust:
# Sign a legal document (ML-DSA-87 + Ed25519 hybrid, selected by use case)
# Encrypt healthcare records (AES-256-GCM, FIPS 203 backend)
22 use cases · 12 algorithms · hybrid + PQ-only modes. Full reference: latticearc-cli README.
What's Inside
| Category | Algorithms | Backend |
|---|---|---|
| PQ KEM | ML-KEM-512/768/1024 (FIPS 203) | aws-lc-rs — FIPS-validatable |
| PQ Signatures | ML-DSA, SLH-DSA, FN-DSA (FIPS 204/205/206) | fips204 / fips205 / fn-dsa |
| Classical | X25519, Ed25519, AES-256-GCM, SHA-2/3, BLAKE2, HKDF | aws-lc-rs / RustCrypto |
--features fips routes AES-GCM, ML-KEM, X25519, and HKDF through the CMVP-validated aws-lc-rs build. PQ signatures use NIST-conformant but non-validated crates. LatticeArc itself is not a CMVP-certified cryptographic module.
Security
#![forbid(unsafe_code)], constant-time comparisons viasubtle, automatic secret zeroization- 30 Kani proofs (18 PR-blocking) + cross-impl differential testing + 31 fuzz targets + Wycheproof + mutation testing at 80% floor
- Pre-1.0: API may change between minor versions; see CHANGELOG.md
More
- GitHub repo — full README, architecture, design docs, verification details
- docs.rs/latticearc — API reference
- SECURITY.md — reporting vulnerabilities, supported versions
License
Apache-2.0