A Rust crate for post-quantum cryptography in Industrial IoT systems.
📚 Full Documentation (NIST/Academic Standard)
- Post-quantum cryptographic algorithms:
- Hybrid KEM (Kyber-1024 + X25519)
- Key Encapsulation Mechanisms (KEMs):
- Kyber
- HQC
- Digital Signatures:
- Falcon
- Galactic Apex Security (V4):
- PUF Identification: Root key derived from silicon fingerprint (Hardware-Intrinsic).
- Mathematical Proofs: Double Ratchet validated via Property-Based Verification.
no_stdandheaplesssupport- Hardware acceleration support
- Performance monitoring and metrics
- Key rotation and management
- Security level management
Designed for FIPS 140-3 and IEC 62443 compliance in Critical Infrastructure:
The invariant-level security contract (threat model assumptions, trust boundaries, fail-closed gates) lives in SECURITY_INVARIANTS.md. Treat it as the reference for adversarial correctness and as the place where regressions must be codified as tests.
- Formal Verification (Kani): The Core Boot Logic (
PartitionManager) is model-checked to be mathematically free of Panics and invalid state transitions. - Continuous Fuzzing: The
fuzz_targetcrate continuously bombards the cryptographic parsers with random inputs to guarantee robustness against malformed data.
- Power-On Self-Tests (POST): Automatically verifies cryptographic integrity (KAT/PCT) on startup.
- Integrity Checks: Validates library integrity using SHA-256 checksums.
- Secure Memory: Automated zeroization of sensitive key material using
Zeroize. - Audit Logging: Structured security events for SIEM integration.
- Hardware Abstraction: Ready for TPM 2.0 / HSM integration via
SecurityProvidertrait.
The crate provides pre-defined combinations of KEM and signature algorithms, optimized for different IIoT scenarios:
- KEM: Kyber (NIST Level 3)
- Signature: Falcon (NIST Level 5)
- Use Case: High-security applications requiring strong signatures
- Performance: Balanced between KEM and signature operations
- Memory Usage: Moderate
- KEM: SABER (NIST Level 3)
- Signature: Dilithium (NIST Level 3)
- Use Case: Applications requiring standardized algorithms
- Performance: Optimized for consistent performance
- Memory Usage: Moderate to high
- KEM: Kyber (NIST Level 3)
- Signature: Dilithium (NIST Level 3)
- Use Case: General-purpose IIoT applications
- Performance: Balanced across all operations
- Memory Usage: Moderate
Select a profile based on your requirements:
- Security Level: Consider the NIST security level needed for your application
- Performance: Evaluate the computational requirements of your devices
- Memory: Check the available memory on your target devices
- Standardization: Consider if you need standardized algorithms
- Use Case: Match the profile to your specific IIoT scenario
use pqc_iiot::crypto::profile::{CryptoProfileTrait, ProfileKyberFalcon};
// Create a profile instance
let profile = ProfileKyberFalcon::new();
// Generate key pair
let (pk, sk) = profile.generate_keypair().unwrap();
// Encapsulate a shared secret
let (ct, ss1) = profile.encapsulate(&pk).unwrap();
// Decapsulate the shared secret
let ss2 = profile.decapsulate(&sk, &ct).unwrap();
assert_eq!(ss1, ss2);
// Sign a message
let msg = b"Hello, IIoT!";
let sig = profile.sign(&sk, msg).unwrap();
// Verify the signature
let valid = profile.verify(&pk, msg, &sig).unwrap();
assert!(valid);use pqc_iiot::crypto::traits::{Metrics, PqcKEM, PqcSignature};
use pqc_iiot::{Falcon, Kyber};
use std::time::Duration;
// Configure key rotation on the concrete primitives (profiles are composition layers).
let kyber = Kyber::new().with_key_rotation_interval(Duration::from_secs(3600));
let falcon = Falcon::new();
// Perform operations
let (pk, _sk) = kyber.generate_keypair().unwrap();
let (_ct, _ss) = kyber.encapsulate(&pk).unwrap();
let (sig_pk, sig_sk) = falcon.generate_keypair().unwrap();
let msg = b"Hello, IIoT!";
let sig = falcon.sign(&sig_sk, msg).unwrap();
assert!(falcon.verify(&sig_pk, msg, &sig).unwrap());
// Get performance metrics
let _ = kyber.metrics();
let _ = falcon.metrics();Profiles can be configured through:
-
Build-time Configuration:
- Feature flags in
Cargo.toml - Environment variables
- Feature flags in
-
Runtime Configuration:
- Profile selection
- Security level adjustment
- Key rotation intervals
- Use appropriate security levels for your threat model
- Implement proper key rotation policies
- Monitor performance metrics for anomalies
- Validate all cryptographic operations
- Use constant-time operations where possible
Each profile has different performance characteristics:
| Profile | Key Generation | Encapsulation | Decapsulation | Signing | Verification |
|---|---|---|---|---|---|
| Kyber+Falcon | Fast | Fast | Fast | Moderate | Fast |
| SABER+Dilithium | Moderate | Moderate | Moderate | Fast | Moderate |
| Kyber+Dilithium | Fast | Fast | Fast | Fast | Moderate |
Approximate memory requirements:
| Profile | Static Memory | Dynamic Memory (Peak) |
|---|---|---|
| Kyber+Falcon | ~10KB | ~50KB |
| SABER+Dilithium | ~15KB | ~60KB |
| Kyber+Dilithium | ~12KB | ~55KB |
This project is licensed under the MIT License.
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.