#[repr(u32)]pub enum MLDSA {
MLDSA44 = 2,
MLDSA65 = 3,
MLDSA87 = 5,
}
Expand description
Security levels for the ML-DSA post-quantum digital signature algorithm.
ML-DSA (Module Lattice-based Digital Signature Algorithm) is a post-quantum digital signature algorithm standardized by NIST. It provides resistance against attacks from both classical and quantum computers.
Each security level offers different trade-offs between security, performance, and key/signature sizes:
MLDSA44
: NIST security level 2 (roughly equivalent to AES-128)MLDSA65
: NIST security level 3 (roughly equivalent to AES-192)MLDSA87
: NIST security level 5 (roughly equivalent to AES-256)
The numeric values (2, 3, 5) correspond to the NIST security levels and are used in CBOR serialization.
Variants§
MLDSA44 = 2
ML-DSA Level 2 (NIST security level 2, roughly equivalent to AES-128)
MLDSA65 = 3
ML-DSA Level 3 (NIST security level 3, roughly equivalent to AES-192)
MLDSA87 = 5
ML-DSA Level 5 (NIST security level 5, roughly equivalent to AES-256)
Implementations§
Source§impl MLDSA
impl MLDSA
Sourcepub fn keypair(self) -> (MLDSAPrivateKey, MLDSAPublicKey)
pub fn keypair(self) -> (MLDSAPrivateKey, MLDSAPublicKey)
Sourcepub fn private_key_size(&self) -> usize
pub fn private_key_size(&self) -> usize
Returns the size of a private key in bytes for this security level.
Sourcepub fn public_key_size(&self) -> usize
pub fn public_key_size(&self) -> usize
Returns the size of a public key in bytes for this security level.
Sourcepub fn signature_size(&self) -> usize
pub fn signature_size(&self) -> usize
Returns the size of a signature in bytes for this security level.