qurox-pq
Alpha — not audited. Do not use in production.
Post-quantum cryptography library for Rust. Implements the NIST FIPS 203/204/205 standards alongside classical ECDSA, with a hybrid mode for gradual migration.
Built as the cryptographic core of Qubex Protocol, a quantum-safe infrastructure project on Internet Computer Protocol that reached the European pool finals at WCHL 2025.
Quick Start
[]
= "0.1.0"
use ;
// ML-DSA-44 (FIPS 204)
let signer = new?;
let sig = signer.sign?;
assert!;
// Classical + post-quantum simultaneously
let hybrid = new?;
let sig = hybrid.sign?;
assert!;
// ML-KEM-768 key encapsulation (FIPS 203)
let enc = new?;
let = enc.encapsulate?;
let recovered = enc.decapsulate?;
assert_eq!;
Algorithms
| Algorithm | Type | Standard |
|---|---|---|
| ML-DSA-44 | Signature | NIST FIPS 204 |
| SLH-DSA-SHA2-128f | Signature | NIST FIPS 205 |
| ML-KEM-768 | Key encapsulation | NIST FIPS 203 |
| ECDSA secp256k1 | Signature | — |
| ECDSA P-256 | Signature | NIST |
| Schnorr | Signature | — |
Hybrid mode
ML-DSA-44 signatures are ~2.4 KB. The hybrid mode signs with both ECDSA and ML-DSA simultaneously — verification requires both to pass. This lets you deploy post-quantum support incrementally without dropping classical compatibility.
use ;
let policy = HybridPolicy ;
let hybrid = with_policy?;
let sig = hybrid.sign_compact?; // zstd-compressed, 60-80% smaller
Advanced API
use ;
let kp = generate_mldsa_keypair?;
let sig = sign?;
assert!;
Architecture
src/
├── algorithms/ # ECDSA, Schnorr, ML-DSA, SLH-DSA, ML-KEM, hybrid
├── bridge.rs # Trait abstractions over individual algorithms
├── compression.rs # zstd/lz4 compression for hybrid signatures
├── errors.rs
├── types.rs
├── simple.rs # High-level API (QuantumSigner, HybridSigner, QuantumEncryptor)
└── lib.rs
Building
Security notes
This library has not been audited. The algorithms themselves (ML-DSA, ML-KEM, SLH-DSA) are NIST-approved, but the implementation here has not been reviewed for side-channel resistance, constant-time correctness, or misuse resistance.
Private keys are zeroized on drop.
License
Apache 2.0 — see LICENSE.
Copyright 2025 Philippe Lecrosnier.