#[repr(u8)]pub enum AlgorithmProfile {
Unrestricted = 0,
Cnsa2 = 1,
Cnsa1 = 2,
}Expand description
Algorithm restriction profile selected at module initialization.
A single binary can serve general FIPS 140-3 consumers
(Unrestricted) and CNSA-restricted deployments (Cnsa2,
Cnsa1) by choosing the appropriate profile at init time.
The profile is immutable once set: it is stored alongside the
module State before the first KAT runs and cannot be changed
without restarting the process (which resets the state machine).
Variants§
Unrestricted = 0
All FIPS-approved algorithms are available. This is the
default and preserves backward compatibility with callers
that use initialize_with_tests.
Cnsa2 = 1
CNSA 2.0 (CNSSP 15): quantum-resistant algorithms only.
AES-256, SHA-384/512, ML-KEM-1024, ML-DSA-87, LMS, XMSS.
SHA3-384/512 and 256-bit SP 800-185 variants are also
allowed. All other algorithms return
Error::AlgorithmRestricted.
Cnsa1 = 2
CNSA 1.0: classical algorithms for the transition period. AES-256, SHA-384, ECDSA/ECDH P-384, RSA >= 3072, DH >= 3072.
Trait Implementations§
Source§impl Clone for AlgorithmProfile
impl Clone for AlgorithmProfile
Source§fn clone(&self) -> AlgorithmProfile
fn clone(&self) -> AlgorithmProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more