ParameterSet

Trait ParameterSet 

Source
pub trait ParameterSet {
    type K: ArraySize;
    type L: ArraySize;
    type Eta: SamplingSize;
    type Gamma1: MaskSamplingSize;
    type Gamma2: Unsigned;
    type TwoGamma2: Unsigned;
    type W1Bits: EncodingSize;
    type Lambda: ArraySize;
    type Omega: ArraySize;

    const TAU: usize;
    const BETA: u32 = _;
}
Expand description

A ParameterSet captures the parameters that describe a particular instance of ML-DSA. There are three variants, corresponding to three different security levels.

Required Associated Constants§

Source

const TAU: usize

Number of nonzero values in the polynomial c

Provided Associated Constants§

Source

const BETA: u32 = _

Beta = Tau * Eta

Required Associated Types§

Source

type K: ArraySize

Number of rows in the A matrix

Source

type L: ArraySize

Number of columns in the A matrix

Source

type Eta: SamplingSize

Private key range

Source

type Gamma1: MaskSamplingSize

Error size bound for y

Source

type Gamma2: Unsigned

Low-order rounding range

Source

type TwoGamma2: Unsigned

Low-order rounding range (2 * gamma2 in terms of the spec)

Source

type W1Bits: EncodingSize

Encoding width of the W1 polynomial, namely bitlen((q - 1) / (2 * gamma2) - 1)

Source

type Lambda: ArraySize

Collision strength of c_tilde, in bytes (lambda / 4 in the spec)

Source

type Omega: ArraySize

Max number of true values in the hint

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ParameterSet for MlDsa44

Source§

impl ParameterSet for MlDsa65

Source§

impl ParameterSet for MlDsa87