| Crates.io | kylix-pqc |
| lib.rs | kylix-pqc |
| version | 0.4.2 |
| created_at | 2026-01-22 04:53:39.668133+00 |
| updated_at | 2026-01-25 13:21:00.216786+00 |
| description | Post-quantum cryptography library implementing NIST FIPS standards |
| homepage | https://kylix-pqc.dev/ |
| repository | https://github.com/crane-valley/kylix |
| max_upload_size | |
| id | 2060760 |
| size | 15,736 |
A post-quantum cryptography library implementing NIST FIPS standards in pure Rust.
no_std compatible for embedded systemsAdd to your Cargo.toml:
[dependencies]
kylix-pqc = "0.4"
use kylix_pqc::ml_kem::{MlKem768, Kem};
use rand::rngs::OsRng;
fn main() -> kylix_pqc::Result<()> {
// Generate a key pair
let (decapsulation_key, encapsulation_key) = MlKem768::keygen(&mut OsRng)?;
// Sender: Encapsulate a shared secret
let (ciphertext, shared_secret_sender) = MlKem768::encaps(&encapsulation_key, &mut OsRng)?;
// Receiver: Decapsulate the shared secret
let shared_secret_receiver = MlKem768::decaps(&decapsulation_key, &ciphertext)?;
// Both parties now have the same shared secret
assert_eq!(shared_secret_sender.as_ref(), shared_secret_receiver.as_ref());
Ok(())
}
use kylix_pqc::ml_dsa::MlDsa65;
use rand::rngs::OsRng;
fn main() -> kylix_pqc::Result<()> {
// Generate a signing key pair
let (signing_key, verifying_key) = MlDsa65::keygen(&mut OsRng)?;
// Sign a message (deterministic signing, no RNG needed)
let message = b"Hello, post-quantum world!";
let signature = MlDsa65::sign(&signing_key, message)?;
// Verify the signature
MlDsa65::verify(&verifying_key, message, &signature)?;
Ok(())
}
use kylix_pqc::slh_dsa::SlhDsaShake128f;
use rand::rngs::OsRng;
fn main() -> kylix_pqc::Result<()> {
// Generate a signing key pair
let (signing_key, verifying_key) = SlhDsaShake128f::keygen(&mut OsRng)?;
// Sign a message (deterministic signing, no RNG needed)
let message = b"Hello, post-quantum world!";
let signature = SlhDsaShake128f::sign(&signing_key, message)?;
// Verify the signature
SlhDsaShake128f::verify(&verifying_key, message, &signature)?;
Ok(())
}
| Crate | Description |
|---|---|
kylix-pqc |
Main crate with re-exports |
kylix-core |
Core traits and utilities |
kylix-ml-kem |
ML-KEM (FIPS 203) implementation |
kylix-ml-dsa |
ML-DSA (FIPS 204) implementation |
kylix-slh-dsa |
SLH-DSA (FIPS 205) implementation |
kylix-cli |
Command-line interface |
WARNING: This library has not been audited. Use at your own risk.
See SECURITY.md for security policy and reporting vulnerabilities.
This crate requires Rust 1.75 or later.
This project is licensed under the MIT License.
Contributions are welcome! Please see CLAUDE.md for project guidelines before submitting PRs.