Skip to main content

RingParams

Trait RingParams 

Source
pub trait RingParams {
    const N: usize;
    const Q: i32;
    const ROWS_IN_A: usize;
    const COLUMNS_IN_A: usize;
    const TAU: usize;
    const GAMMA1_EXPONENT: usize;
    const GAMMA2: i32;
    const ETA: i32;
    const BETA: i32;
}
Expand description

Shared geometry and bounds for (R_q) instantiations used with ML-DSA.

Required Associated Constants§

Source

const N: usize

Polynomial degree n.

Source

const Q: i32

Modulus q.

Source

const ROWS_IN_A: usize

Matrix rows k.

Source

const COLUMNS_IN_A: usize

Matrix columns l.

Source

const TAU: usize

Hamming weight τ of the challenge polynomial.

Source

const GAMMA1_EXPONENT: usize

γ₁ = 2^{γ₁_exp}.

Source

const GAMMA2: i32

γ₂ = ⌊(q-1)/88⌋ (ML-DSA-44) or ⌊(q-1)/32⌋ (65/87).

Source

const ETA: i32

η (centered binomial / uniform width parameter as an integer bound).

Source

const BETA: i32

β = τ · η.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl RingParams for MlDsa44Params

Source§

const N: usize = 256

Source§

const Q: i32 = crate::constants::FIELD_MODULUS

Source§

const ROWS_IN_A: usize = 4

Source§

const COLUMNS_IN_A: usize = 4

Source§

const TAU: usize = 39

Source§

const GAMMA1_EXPONENT: usize = 17

Source§

const GAMMA2: i32

Source§

const ETA: i32 = 2

Source§

const BETA: i32

Source§

impl RingParams for MlDsa65Params

Source§

const N: usize = 256

Source§

const Q: i32 = crate::constants::FIELD_MODULUS

Source§

const ROWS_IN_A: usize = 6

Source§

const COLUMNS_IN_A: usize = 5

Source§

const TAU: usize = 49

Source§

const GAMMA1_EXPONENT: usize = 19

Source§

const GAMMA2: i32

Source§

const ETA: i32 = 4

Source§

const BETA: i32

Source§

impl RingParams for MlDsa87Params

Source§

const N: usize = 256

Source§

const Q: i32 = crate::constants::FIELD_MODULUS

Source§

const ROWS_IN_A: usize = 8

Source§

const COLUMNS_IN_A: usize = 7

Source§

const TAU: usize = 60

Source§

const GAMMA1_EXPONENT: usize = 19

Source§

const GAMMA2: i32

Source§

const ETA: i32 = 2

Source§

const BETA: i32