Skip to main content

Module decompose

Module decompose 

Source
Expand description

Decomposition, rounding, and hint functions for signatures. Decomposition algorithms for ML-DSA (FIPS 204, Algorithms 35-40).

Implements the Decompose, HighBits, LowBits, MakeHint, and UseHint functions used during signing and verification to split polynomial coefficients into high-order and low-order parts with respect to alpha = 2 * gamma2.

All vector functions operate on slices and fixed arrays – no heap allocations.

Functions§

decompose
Decompose a coefficient into high and low parts.
high_bits
Extract the high-order representative of a coefficient.
high_bits_vec
Apply high_bits to every coefficient of a polynomial vector.
low_bits
Extract the low-order representative of a coefficient.
low_bits_vec
Apply low_bits to every coefficient of a polynomial vector.
make_hint
Compute a single hint bit.
make_hint_vec
Apply make_hint to every coefficient of two polynomial vectors.
use_hint
Use a hint bit to recover the correct high bits.
use_hint_vec
Apply use_hint to every coefficient of a hint vector and an approximate vector.