qrllib
A Rust implementation of the QRL (Quantum Resistant
Ledger) cryptographic primitives, wallet helpers, and address format — a
faithful port of go-qrllib, usable from
both native and WebAssembly targets.
Schemes
| Scheme | Standard | Type | Entry point |
|---|---|---|---|
| ML-DSA-87 | FIPS 204 | Signature | [MlDsa87] |
| ML-KEM-1024 | FIPS 203 | KEM | [DecapsulationKey] / [EncapsulationKey] |
| SPHINCS+-256s | pre-FIPS-205 submission | Signature | [SphincsPlus256s] |
| XMSS (SHA2_10_256) | RFC 8391 | Stateful signature | [Xmss] |
| Legacy XMSS | QRL v1 | Migration shim | [LegacyXmssWallet] |
Plus QRL wallet, address, descriptor, mnemonic, and seed helpers
(MlDsa87Wallet, get_address, bin_to_mnemonic, ExtendedSeed, …).
Usage
[]
= "0.1"
Sign and verify with ML-DSA-87:
use ;
// Use a CSPRNG to fill the seed in production code.
let seed = ;
let signer = from_seed;
let public_key = signer.public_key_bytes;
let context = b"my-app-v1";
let message = b"hello, post-quantum world";
let signature = signer.sign.expect;
assert!;
See the API docs for the wallet-level API
(MlDsa87Wallet, QRL addresses, mnemonics) and the other schemes.
Feature flags
experimental-sphincsplus-issuance(off by default) — gates the creation of new SPHINCS+ wallets. The implementation is the pre-FIPS-205 SPHINCS+ submission; QRL has not yet committed to a specific SLH-DSA parameter set under FIPS 205, so issuing wallets is disabled by default to avoid locking users to a parameter set that may change. Verification of existing SPHINCS+ signatures is always available — only wallet creation is gated.
Validation
The implementations are checked for byte-level correctness against:
- Reference implementations via CI cross-verification — pq-crystals (ML-DSA-87), the SPHINCS+ reference, and the XMSS reference.
- NIST ACVP test vectors (ML-DSA-87, ML-KEM-1024).
- Project Wycheproof and C2SP/CCTV vectors (ML-KEM-1024).
Security
This crate handles cryptographic key material. See
SECURITY.md
in the repository for the security policy, standards-alignment notes, and how to
report vulnerabilities.
License
Licensed under the MIT License.