docs.rs failed to build qasa-0.0.7
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
qasa-0.0.3
QaSa (Quantum-Safe) is a production-ready, post-quantum cryptography library for Rust. Built on NIST-standardized algorithms, it provides protection against both classical and quantum computer attacks.
Why QaSa?
- Future-Proof Security - NIST-selected post-quantum algorithms (Kyber, Dilithium, SPHINCS+)
- Zero-Copy Design - Efficient memory handling with minimal allocations
- Ergonomic API - Simple, intuitive interfaces for complex cryptographic operations
- Memory Safety - Automatic zeroization of sensitive data with
SecureBytes - Battle-Tested - Built on the proven liboqs library
Installation
[]
= "0.0.6"
Quick Start
Key Encapsulation (Kyber)
use *;
Digital Signatures (Dilithium)
use *;
End-to-End Encrypted Messaging
use *;
Security Levels
QaSa supports multiple security levels aligned with NIST standards:
| Algorithm | Level 1 (128-bit) | Level 3 (192-bit) | Level 5 (256-bit) |
|---|---|---|---|
| Kyber | Kyber512 | Kyber768 | Kyber1024 |
| Dilithium | Dilithium2 | Dilithium3 | Dilithium5 |
| SPHINCS+ | Sphincs128f/s | Sphincs192f/s | Sphincs256f/s |
Core Features
Cryptographic Primitives
- CRYSTALS-Kyber - Lattice-based key encapsulation mechanism (KEM)
- CRYSTALS-Dilithium - Lattice-based digital signatures
- SPHINCS+ - Hash-based stateless signatures
- BIKE - Code-based KEM for algorithm diversity
- AES-GCM - Authenticated symmetric encryption
- ChaCha20-Poly1305 - Alternative authenticated encryption
Security Features
- Secure Memory -
SecureByteswith automatic zeroization - Constant-Time Operations - Side-channel resistant implementations
- Memory Locking - Optional
mlock()for sensitive data - Canary Buffers - Overflow detection for critical buffers
Optional Features
[]
= { = "0.0.7", = ["simd", "lean"] }
| Feature | Description |
|---|---|
simd |
SIMD optimizations (default) |
lean |
Optimized for constrained environments |
python |
Python bindings via PyO3 |
wasm |
WebAssembly support |
hardware-acceleration |
Hardware crypto acceleration |
Secure Memory Handling
QaSa provides secure containers that automatically zero memory when dropped:
use *;
// SecureBytes automatically zeros on drop
let secret = from;
// Scoped secure operations
with_secure_scope?;
// Locked memory (won't be swapped to disk)
let locked = new?;
Hybrid Encryption
Combine classical and post-quantum algorithms for defense in depth:
use *;
// Hybrid KEM: X25519 + Kyber768
let hybrid_keypair = generate?;
// Even if one algorithm is broken, your data remains secure
let = hybrid_keypair.public_key.encapsulate?;
Performance
Benchmarked on AMD Ryzen 9 5900X:
| Operation | Kyber768 | Dilithium3 |
|---|---|---|
| Key Generation | 0.31 ms | 2.09 ms |
| Encapsulate/Sign | 0.36 ms | 4.98 ms |
| Decapsulate/Verify | 0.39 ms | 1.52 ms |
Run benchmarks yourself:
Examples
Explore the examples/ directory:
Documentation
Security Considerations
QaSa implements NIST-standardized post-quantum algorithms. However:
- Post-quantum cryptography is evolving - Stay updated with NIST announcements
- Side-channel attacks - While we implement constant-time operations, hardware vulnerabilities may exist
- Key management - Use the provided secure storage; never store raw keys
Report security vulnerabilities to: djwarfqasa@proton.me
Contributing
We welcome contributions! Please read CONTRIBUTING.md for guidelines.
# Run tests
# Run benchmarks
# Check formatting
# Run clippy
License
MIT License - see LICENSE for details.
Acknowledgments
- Open Quantum Safe project
- NIST Post-Quantum Cryptography standardization
- The Rust cryptography community