This document provides detailed information about the security features and considerations of the PQC-IIoT crate.
For the project’s invariant-level security contract, see SECURITY_INVARIANTS.md at the repository root. That document is the reference for “what must always remain true” under adversarial conditions (replay, rollback, partitions, broker compromise).
- Cryptographic Primitives
- Protocol Security
- Implementation Security
- Best Practices
- Threat Model
- Security Considerations
- NIST Round 3 finalist
- Security levels:
- Kyber512 (Level 1)
- Kyber768 (Level 3, recommended)
- Kyber1024 (Level 5)
- Based on Module-LWE
- Constant-time implementation
- Side-channel resistant
- NIST Round 3 finalist
- Security levels:
- LightSaber (Level 1)
- Saber (Level 3, recommended)
- FireSaber (Level 5)
- Based on Module-LWR
- Optimized for embedded systems
- Constant-time implementation
- NIST Round 3 finalist
- Security levels:
- Falcon-512 (Level 1)
- Falcon-1024 (Level 5)
- Based on NTRU lattices
- Compact signatures
- Fast verification
- NIST Round 3 finalist
- Security levels:
- Dilithium2 (Level 2)
- Dilithium3 (Level 3, recommended)
- Dilithium5 (Level 5)
- Based on Module-LWE
- Balanced performance
- Robust implementation
- Provisioned identity (strict-mode) via signed operational certificates + key announcements bound to peer id/topic.
- v1 per-message hybrid encryption (Kyber + X25519 → AES-256-GCM) with signature authentication and sliding-window replay protection.
- v4 forward-secure sessions (authenticated handshake + hybrid DH+KEM double ratchet) with topic/context binding, bounded out-of-order acceptance, and in-session PQC refresh.
- Partition-aware policy + revocation updates (CA-signed, monotonic, retained) with fail-closed gates for high-risk operations.
- Asymmetric-cost DoS containment: size limits + peer-id sanitation + per-peer/global token-bucket budgets before expensive crypto.
- Signed payload mode: authenticity-only of application payloads when peer keys are pinned.
- Custom secure session mode: confidentiality + integrity + anti-replay at the application layer (not OSCORE/DTLS).
- OSCORE mode (RFC 8613): standards-aligned message protection (feature
coap-oscore). - For interoperability/compliance-critical deployments, OSCORE with a standard AKE (e.g., EDHOC) or DTLS is the “industrial” transport/security boundary.
- Stack allocation where possible
- Zeroization of sensitive data
- Bounds checking
- No undefined behavior
- Constant-time operations
- Memory access patterns
- Branch-free code
- Cache timing protection
- Secure error reporting
- No information leakage
- Graceful failure
- Recovery mechanisms
-
Generation
// Use recommended security levels let kyber = Kyber::new_with_level(KyberSecurityLevel::Kyber768); let falcon = Falcon::new_with_level(FalconSecurityLevel::Falcon512);
-
Storage
// Store keys securely key_storage.store_public_key(&pk)?; key_storage.store_secret_key(&sk)?;
-
Rotation
// Configure key rotation kyber.with_key_rotation_interval(Duration::from_secs(3600));
-
MQTT
// Strict mode requires provisioning (no TOFU): // - pin `trust_anchor_ca_sig_pk` // - install an `OperationalCertificate` for this identity // // See docs/mqtt.md for the end-to-end flow. let _client = SecureMqttClient::new("localhost", 1883, "client_id")?;
-
CoAP
// Configure secure client let client = SecureCoapClient::new()? .with_dtls_config(dtls_config)? .with_acl(acl_rules)?;
- Quantum computing attacks
- Classical cryptanalysis
- Side-channel attacks
- Fault injection
- Man-in-the-middle
- Replay attacks
- Denial of service
- Eavesdropping
- Memory corruption
- Timing attacks
- Power analysis
- Fault injection
- 32-bit processor
- 32KB RAM minimum
- 128KB Flash minimum
- Hardware RNG
- Key generation time
- Encryption/decryption time
- Signature/verification time
- Memory usage
-
Assessment
- Evaluate security requirements
- Choose appropriate algorithms
- Configure security levels
-
Implementation
- Follow best practices
- Enable security features
- Configure monitoring
-
Maintenance
- Regular updates
- Key rotation
- Security audits
- Monitor security advisories
- Evaluate impact
- Plan updates
- Test changes
- Review patches
- Test updates
- Deploy changes
- Verify security
- Detect incidents
- Assess impact
- Contain threat
- Recover systems
- Learn from incident