pub enum DilithiumMode {
Dilithium2,
Dilithium3,
Dilithium5,
}Expand description
ML-DSA / Dilithium security levels (FIPS 204).
The FIPS 204 standard names are ML-DSA-44, ML-DSA-65, and ML-DSA-87. The Dilithium2/3/5 names are provided for compatibility with the original CRYSTALS-Dilithium submission.
Variants§
Dilithium2
ML-DSA-44 (NIST Level 2): K=4, L=4
Dilithium3
ML-DSA-65 (NIST Level 3): K=6, L=5
Dilithium5
ML-DSA-87 (NIST Level 5): K=8, L=7
Implementations§
Source§impl DilithiumMode
impl DilithiumMode
Sourcepub const fn mode_tag(self) -> u8
pub const fn mode_tag(self) -> u8
Byte tag for binary serialization (matches NIST level: 2, 3, 5).
Sourcepub const fn gamma1(self) -> i32
pub const fn gamma1(self) -> i32
Masking vector coefficient range: coefficients in [-(GAMMA1-1), GAMMA1].
Sourcepub const fn ctildebytes(self) -> usize
pub const fn ctildebytes(self) -> usize
Challenge hash output length in bytes.
Sourcepub const fn polyz_packedbytes(self) -> usize
pub const fn polyz_packedbytes(self) -> usize
Packed size for z polynomial.
Sourcepub const fn polyw1_packedbytes(self) -> usize
pub const fn polyw1_packedbytes(self) -> usize
Packed size for w1 polynomial.
Sourcepub const fn polyeta_packedbytes(self) -> usize
pub const fn polyeta_packedbytes(self) -> usize
Packed size for eta polynomial.
Sourcepub const fn public_key_bytes(self) -> usize
pub const fn public_key_bytes(self) -> usize
Public key size in bytes.
Sourcepub const fn secret_key_bytes(self) -> usize
pub const fn secret_key_bytes(self) -> usize
Secret key size in bytes.
Sourcepub const fn signature_bytes(self) -> usize
pub const fn signature_bytes(self) -> usize
Signature size in bytes.
Trait Implementations§
Source§impl Clone for DilithiumMode
impl Clone for DilithiumMode
Source§fn clone(&self) -> DilithiumMode
fn clone(&self) -> DilithiumMode
Returns a duplicate of the value. Read more
1.0.0 · 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 DilithiumMode
impl Debug for DilithiumMode
Source§impl<'de> Deserialize<'de> for DilithiumMode
impl<'de> Deserialize<'de> for DilithiumMode
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 DilithiumMode
impl PartialEq for DilithiumMode
Source§impl Serialize for DilithiumMode
impl Serialize for DilithiumMode
impl Copy for DilithiumMode
impl Eq for DilithiumMode
impl StructuralPartialEq for DilithiumMode
Auto Trait Implementations§
impl Freeze for DilithiumMode
impl RefUnwindSafe for DilithiumMode
impl Send for DilithiumMode
impl Sync for DilithiumMode
impl Unpin for DilithiumMode
impl UnsafeUnpin for DilithiumMode
impl UnwindSafe for DilithiumMode
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