Dilithium3Params

Struct Dilithium3Params 

Source
pub struct Dilithium3Params {
    pub n: usize,
    pub q: u32,
    pub d: u32,
    pub k: usize,
    pub l: usize,
    pub eta: u32,
    pub tau: usize,
    pub public_key_size: usize,
    pub secret_key_size: usize,
    pub signature_size: usize,
}
Expand description

Structure containing ML-DSA-65 parameters FIPS 204, Table 1: ML-DSA-65 (NIST security category 3)

Fields§

§n: usize

Polynomial degree n = 256

§q: u32

Modulus q = 8380417

§d: u32

Dropped bits d = 13

§k: usize

Matrix dimension k = 6 (rows)

§l: usize

Matrix dimension ℓ = 5 (columns)

§eta: u32

Infinity norm bound η = 4

§tau: usize

Challenge weight τ = 49

§public_key_size: usize

Public key size = 1952 bytes

§secret_key_size: usize

Secret key size = 4032 bytes (includes 32-byte K seed)

§signature_size: usize

Signature size = 3309 bytes

Trait Implementations§

Source§

impl DilithiumSchemeParams for Dilithium3Params

Source§

const NAME: &'static str = "Dilithium3"

Algorithm name (ML-DSA-44, ML-DSA-65, ML-DSA-87)
Source§

const D_PARAM: u32 = 13u32

Dropped bits parameter d (FIPS 204, Table 1)
Source§

const K_DIM: usize = 6usize

Number of polynomials in s₂ and t (rows in matrix A)
Source§

const L_DIM: usize = 5usize

Number of polynomials in s₁ and y (columns in matrix A)
Source§

const LAMBDA: usize = 192usize

Classical security parameter λ in bits ML-DSA-44: λ = 128, ML-DSA-65: λ = 192, ML-DSA-87: λ = 256
Source§

const CHALLENGE_BYTES: usize = 48usize

Challenge hash size in bytes (λ/4) ML-DSA-44: 32 bytes, ML-DSA-65: 48 bytes, ML-DSA-87: 64 bytes
Source§

const ETA_S1S2: u32 = 4u32

Bound η for secret polynomials s₁, s₂
Source§

const GAMMA1_PARAM: u32 = 524_288u32

Range parameter γ₁ for masking vector y
Source§

const GAMMA1_BITS: usize = 20usize

Number of bits to represent z coefficients Computed as ceil(log₂(2·γ₁)) DEPRECATED: Use Z_BITS for packing z coefficients
Source§

const GAMMA2_PARAM: u32 = 261_888u32

Decomposition parameter γ₂
Source§

const BETA_PARAM: u32 = 196u32

Rejection bound β = τ·η (FIPS 204, Table 1)
Source§

const OMEGA_PARAM: u32 = 55u32

Maximum number of hint bits ω (FIPS 204, Table 1)
Source§

const TAU_PARAM: usize = 49usize

Number of ±1 coefficients in challenge polynomial c
Source§

const PUBLIC_KEY_BYTES: usize = 1_952usize

Public key size in bytes
Source§

const SECRET_KEY_BYTES: usize = 4_032usize

Secret key size in bytes (includes 32-byte K seed)
Source§

const SIGNATURE_SIZE: usize = 3_309usize

Signature size in bytes
Source§

const W1_BITS: usize = 5usize

Bits for packing w₁ coefficients FIPS 204, Algorithm 28: b = bitlen((q-1)/(2·γ₂) − 1)
Source§

const Z_BITS: usize = 20usize

Number of bits used when packing each z-coefficient in signatures This is determined by the range [-γ₁+β, γ₁-β] which requires: Read more
Source§

const N: usize = 256usize

Polynomial degree n = 256 (FIPS 204, Table 1)
Source§

const Q: u32 = 8_380_417u32

Prime modulus q = 2²³ - 2¹³ + 1 (FIPS 204, Table 1)
Source§

const SEED_RHO_BYTES: usize = 32usize

Seed size for matrix A generation (ρ)
Source§

const SEED_KEY_BYTES: usize = 32usize

Seed size for secret/error sampling (ρ’)
Source§

const SEED_ZETA_BYTES: usize = 32usize

Master seed size for key generation (ζ)
Source§

const HASH_TR_BYTES: usize = 32usize

Hash output size for tr = H(pk)
Source§

const MAX_SIGN_ABORTS: u16 = 1_000u16

Maximum signing attempts before failure

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.