pub enum SecurityLevel {
Level2,
Level3,
Level5,
}Expand description
NIST security levels for ML-DSA
Variants§
Level2
NIST Level 2 - 128-bit security (ML-DSA-44)
Level3
NIST Level 3 - 192-bit security (ML-DSA-65) - RECOMMENDED
Level5
NIST Level 5 - 256-bit security (ML-DSA-87)
Implementations§
Source§impl SecurityLevel
impl SecurityLevel
Sourcepub fn public_key_size(&self) -> usize
pub fn public_key_size(&self) -> usize
Get the public key size in bytes
Sourcepub fn secret_key_size(&self) -> usize
pub fn secret_key_size(&self) -> usize
Get the secret key size in bytes
Sourcepub fn signature_size(&self) -> usize
pub fn signature_size(&self) -> usize
Get the signature size in bytes
Sourcepub fn algorithm_name(&self) -> &'static str
pub fn algorithm_name(&self) -> &'static str
Get the algorithm name
Trait Implementations§
Source§impl Clone for SecurityLevel
impl Clone for SecurityLevel
Source§fn clone(&self) -> SecurityLevel
fn clone(&self) -> SecurityLevel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SecurityLevel
impl Debug for SecurityLevel
Source§impl Default for SecurityLevel
impl Default for SecurityLevel
Source§impl<'de> Deserialize<'de> for SecurityLevel
impl<'de> Deserialize<'de> for SecurityLevel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SecurityLevel
impl PartialEq for SecurityLevel
Source§fn eq(&self, other: &SecurityLevel) -> bool
fn eq(&self, other: &SecurityLevel) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SecurityLevel
impl Serialize for SecurityLevel
impl Copy for SecurityLevel
impl Eq for SecurityLevel
impl StructuralPartialEq for SecurityLevel
Auto Trait Implementations§
impl Freeze for SecurityLevel
impl RefUnwindSafe for SecurityLevel
impl Send for SecurityLevel
impl Sync for SecurityLevel
impl Unpin for SecurityLevel
impl UnsafeUnpin for SecurityLevel
impl UnwindSafe for SecurityLevel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.