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: usizePolynomial degree n = 256
q: u32Modulus q = 8380417
d: u32Dropped bits d = 13
k: usizeMatrix dimension k = 6 (rows)
l: usizeMatrix dimension ℓ = 5 (columns)
eta: u32Infinity norm bound η = 4
tau: usizeChallenge weight τ = 49
public_key_size: usizePublic key size = 1952 bytes
secret_key_size: usizeSecret key size = 4032 bytes (includes 32-byte K seed)
signature_size: usizeSignature size = 3309 bytes
Trait Implementations§
Source§impl DilithiumSchemeParams for Dilithium3Params
impl DilithiumSchemeParams for Dilithium3Params
Source§const LAMBDA: usize = 192usize
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
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 GAMMA1_PARAM: u32 = 524_288u32
const GAMMA1_PARAM: u32 = 524_288u32
Range parameter γ₁ for masking vector y
Source§const GAMMA1_BITS: usize = 20usize
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
const GAMMA2_PARAM: u32 = 261_888u32
Decomposition parameter γ₂
Source§const BETA_PARAM: u32 = 196u32
const BETA_PARAM: u32 = 196u32
Rejection bound β = τ·η (FIPS 204, Table 1)
Source§const OMEGA_PARAM: u32 = 55u32
const OMEGA_PARAM: u32 = 55u32
Maximum number of hint bits ω (FIPS 204, Table 1)
Source§const PUBLIC_KEY_BYTES: usize = 1_952usize
const PUBLIC_KEY_BYTES: usize = 1_952usize
Public key size in bytes
Source§const SECRET_KEY_BYTES: usize = 4_032usize
const SECRET_KEY_BYTES: usize = 4_032usize
Secret key size in bytes (includes 32-byte K seed)
Source§const SIGNATURE_SIZE: usize = 3_309usize
const SIGNATURE_SIZE: usize = 3_309usize
Signature size in bytes
Source§const W1_BITS: usize = 5usize
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
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 SEED_RHO_BYTES: usize = 32usize
const SEED_RHO_BYTES: usize = 32usize
Seed size for matrix A generation (ρ)
Source§const SEED_KEY_BYTES: usize = 32usize
const SEED_KEY_BYTES: usize = 32usize
Seed size for secret/error sampling (ρ’)
Source§const SEED_ZETA_BYTES: usize = 32usize
const SEED_ZETA_BYTES: usize = 32usize
Master seed size for key generation (ζ)
Source§const HASH_TR_BYTES: usize = 32usize
const HASH_TR_BYTES: usize = 32usize
Hash output size for tr = H(pk)
Source§const MAX_SIGN_ABORTS: u16 = 1_000u16
const MAX_SIGN_ABORTS: u16 = 1_000u16
Maximum signing attempts before failure
Auto Trait Implementations§
impl Freeze for Dilithium3Params
impl RefUnwindSafe for Dilithium3Params
impl Send for Dilithium3Params
impl Sync for Dilithium3Params
impl Unpin for Dilithium3Params
impl UnwindSafe for Dilithium3Params
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