pub struct Dilithium5Params {
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-87 parameters FIPS 204, Table 1: ML-DSA-87 (NIST security category 5)
Fields§
§n: usizePolynomial degree n = 256
q: u32Modulus q = 8380417
d: u32Dropped bits d = 13
k: usizeMatrix dimension k = 8 (rows)
l: usizeMatrix dimension ℓ = 7 (columns)
eta: u32Infinity norm bound η = 2
tau: usizeChallenge weight τ = 60
public_key_size: usizePublic key size = 2592 bytes
secret_key_size: usizeSecret key size = 4896 bytes (includes 32-byte K seed)
signature_size: usizeSignature size = 4627 bytes
Trait Implementations§
Source§impl DilithiumSchemeParams for Dilithium5Params
impl DilithiumSchemeParams for Dilithium5Params
Source§const LAMBDA: usize = 256usize
const LAMBDA: usize = 256usize
Classical security parameter λ in bits
ML-DSA-44: λ = 128, ML-DSA-65: λ = 192, ML-DSA-87: λ = 256
Source§const CHALLENGE_BYTES: usize = 64usize
const CHALLENGE_BYTES: usize = 64usize
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 = 120u32
const BETA_PARAM: u32 = 120u32
Rejection bound β = τ·η (FIPS 204, Table 1)
Source§const OMEGA_PARAM: u32 = 75u32
const OMEGA_PARAM: u32 = 75u32
Maximum number of hint bits ω (FIPS 204, Table 1)
Source§const PUBLIC_KEY_BYTES: usize = 2_592usize
const PUBLIC_KEY_BYTES: usize = 2_592usize
Public key size in bytes
Source§const SECRET_KEY_BYTES: usize = 4_896usize
const SECRET_KEY_BYTES: usize = 4_896usize
Secret key size in bytes (includes 32-byte K seed)
Source§const SIGNATURE_SIZE: usize = 4_627usize
const SIGNATURE_SIZE: usize = 4_627usize
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 Dilithium5Params
impl RefUnwindSafe for Dilithium5Params
impl Send for Dilithium5Params
impl Sync for Dilithium5Params
impl Unpin for Dilithium5Params
impl UnwindSafe for Dilithium5Params
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