#[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.
Trait Implementations§
impl Copy for MLDSA
impl Eq for MLDSA
impl StructuralPartialEq for MLDSA
Auto Trait Implementations§
impl Freeze for MLDSA
impl RefUnwindSafe for MLDSA
impl Send for MLDSA
impl Sync for MLDSA
impl Unpin for MLDSA
impl UnwindSafe for MLDSA
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CBOREncodable for T
impl<T> CBOREncodable for T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)