kylix-pqc
Post-Quantum Cryptography for Rust
A pure Rust implementation of NIST FIPS post-quantum cryptography standards. Secure your applications against quantum computing threats.
Quick Start
cargo add kylix-pqc Features
ML-KEM (FIPS 203)
Module-Lattice-Based Key Encapsulation Mechanism with security levels 1, 3, and 5.
no_std Compatible
Works in embedded systems and WebAssembly environments without the standard library.
Constant-Time
Side-channel resistant implementations to prevent timing attacks.
Secure Memory
Automatic zeroization of sensitive data when no longer needed.
Example
use kylix_pqc::ml_kem::{MlKem768, Kem};
use rand::rngs::OsRng;
// Generate a key pair
let (dk, ek) = MlKem768::keygen(&mut OsRng)?;
// Encapsulate a shared secret
let (ct, ss_sender) = MlKem768::encaps(&ek, &mut OsRng)?;
// Decapsulate the shared secret
let ss_receiver = MlKem768::decaps(&dk, &ct)?;
assert_eq!(ss_sender.as_ref(), ss_receiver.as_ref());