Expand description
Sampling algorithms for matrix, secret, and masking generation. Sampling algorithms for ML-DSA (FIPS 204, Algorithms 29-34).
Provides functions to sample polynomials and polynomial vectors from various distributions using SHAKE-based extendable output functions. All sampling routines use rejection sampling to ensure uniform output. All returned data lives on the stack (no heap allocations).
Functionsยง
- expand_
a - Expand the public matrix A in NTT domain from a seed.
- expand_
mask - Expand the masking vector y from a seed and counter.
- expand_
s - Expand the secret vectors s1 and s2 from a seed.
- rej_
bounded_ poly - Generate a polynomial with small coefficients via rejection sampling.
- rej_
ntt_ poly - Generate an NTT-domain polynomial via rejection sampling.
- sample_
in_ ball - Sample a sparse challenge polynomial with exactly tau non-zero entries.