pub struct MlDsa87Params {
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 MlDsaSchemeParams for MlDsa87Params
impl MlDsaSchemeParams for MlDsa87Params
Source§const LAMBDA: usize = 256
const LAMBDA: usize = 256
Classical security parameter λ in bits
ML-DSA-44: λ = 128, ML-DSA-65: λ = 192, ML-DSA-87: λ = 256
Source§const CHALLENGE_BYTES: usize = 64
const CHALLENGE_BYTES: usize = 64
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
const GAMMA1_PARAM: u32
Range parameter γ₁ for masking vector y
Source§const GAMMA1_BITS: usize = 20
const GAMMA1_BITS: usize = 20
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
const GAMMA2_PARAM: u32
Decomposition parameter γ₂
Source§const BETA_PARAM: u32 = 120
const BETA_PARAM: u32 = 120
Rejection bound β = τ·η (FIPS 204, Table 1)
Source§const OMEGA_PARAM: u32 = 75
const OMEGA_PARAM: u32 = 75
Maximum number of hint bits ω (FIPS 204, Table 1)
Source§const PUBLIC_KEY_BYTES: usize = 2592
const PUBLIC_KEY_BYTES: usize = 2592
Public key size in bytes
Source§const SECRET_KEY_BYTES: usize = 4896
const SECRET_KEY_BYTES: usize = 4896
Secret key size in bytes (includes 32-byte K seed)
Source§const SIGNATURE_SIZE: usize = 4627
const SIGNATURE_SIZE: usize = 4627
Signature size in bytes
Source§const W1_BITS: usize = 4
const W1_BITS: usize = 4
Bits for packing w₁ coefficients
FIPS 204, Algorithm 28: b = bitlen((q-1)/(2·γ₂) − 1)
Source§const Z_BITS: usize = 20
const Z_BITS: usize = 20
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 = 32
const SEED_RHO_BYTES: usize = 32
Seed size for matrix A generation (ρ)
Source§const SEED_KEY_BYTES: usize = 64
const SEED_KEY_BYTES: usize = 64
Seed size for secret/error sampling (ρ’)
Source§const SEED_ZETA_BYTES: usize = 32
const SEED_ZETA_BYTES: usize = 32
Master seed size for key generation (ζ)
Source§const HASH_TR_BYTES: usize = 64
const HASH_TR_BYTES: usize = 64
Hash output size for tr = H(pk)
Source§const MAX_SIGN_ABORTS: u16 = 1000
const MAX_SIGN_ABORTS: u16 = 1000
Maximum signing attempts before failure
Source§const FIXED_SIGNING_WINDOW: u16 = FIPS204_SIGN_INTERNAL_MIN_LOOP_LIMIT
const FIXED_SIGNING_WINDOW: u16 = FIPS204_SIGN_INTERNAL_MIN_LOOP_LIMIT
Fixed public signing window used by the constant-time signer. Read more
Auto Trait Implementations§
impl Freeze for MlDsa87Params
impl RefUnwindSafe for MlDsa87Params
impl Send for MlDsa87Params
impl Sync for MlDsa87Params
impl Unpin for MlDsa87Params
impl UnsafeUnpin for MlDsa87Params
impl UnwindSafe for MlDsa87Params
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