Expand description
§Quantum Shield
Hybrid quantum-resistant cryptography library using NIST-standardized post-quantum algorithms.
§Features
- Hybrid Encryption: RSA-4096 + Kyber-1024 (NIST Level 5)
- Hybrid Signatures: RSA-4096-PSS + Dilithium5 (NIST Level 5)
- Defense in Depth: Multiple independent security layers
- Automatic Failover: Falls back to Kyber if RSA decryption fails
§Quick Example
use quantum_shield::{HybridCrypto, Result};
// Generate keypairs for Alice and Bob
let alice = HybridCrypto::generate_keypair()?;
let bob = HybridCrypto::generate_keypair()?;
// Alice encrypts a message for Bob
let message = b"Secret quantum-resistant message";
let encrypted = alice.encrypt(message, &bob.public_keys())?;
// Bob decrypts the message
let decrypted = bob.decrypt(&encrypted)?;
assert_eq!(message, &decrypted[..]);Modules§
- prelude
- Re-export commonly used types
Structs§
- Algorithm
Agility - Algorithm agility manager for crypto-agility
- Crypto
Version - Cryptography version for algorithm agility
- Entropy
Monitor - Entropy pool monitor for key generation security
- Hybrid
Ciphertext - Hybrid encrypted data (RSA + Kyber + AES)
- Hybrid
Crypto - Main hybrid cryptography engine
- Hybrid
Signature - Hybrid digital signature (RSA + Dilithium)
- KeyPair
- Complete keypair (public + private)
- Private
Keys - Private keys (zeroized on drop for security)
- Public
Keys - Public keys bundle for hybrid cryptography
- Secure
Memory - Enhanced memory scrubbing with stack and register zeroization
- Security
Audit Result - Security audit results
- Security
Manager - Comprehensive security manager
- Timing
Protection - Timing attack prevention with jitter and blinding
Enums§
- Error
- Errors that can occur during cryptographic operations
Constants§
- DEFAULT_
CRYPTO_ VERSION - DEFAULT_
ENTROPY_ THRESHOLD - DILITHIUM_
KEY_ SIZE - ENTROPY_
BUFFER_ SIZE - HASH_
OUTPUT_ SIZE - KYBE
R1024_ CIPHERTEXT_ BYTES - KYBER_
KEY_ SIZE - MAX_
ALGORITHM_ VERSIONS - MAX_
ENCRYPTION_ SIZE - MAX_
KEY_ SIZE - MAX_
SIGNATURE_ SIZE - MAX_
TIMING_ JITTER_ MICROS - MEMORY_
SCRUB_ ROUNDS - MEMORY_
USAGE_ THRESHOLD_ MB - MIN_
ENTROPY_ TIME_ SECONDS - NIST_
LEVEL_ 5 - NONCE_
BYTES - RSA_
KEY_ SIZE - SECURE_
ALLOCATION_ SIZE - SLOW_
OPERATION_ THRESHOLD_ MS
Functions§
- constant_
time_ compare - Constant-time comparison to prevent timing attacks
- constant_
time_ select - Constant-time selection based on condition
Type Aliases§
- Result
- Result type alias for Quantum Shield operations