Index Mathematics Conjectures nbv lettuce Widgets

assert_dilithium

stdlib/fields/assert_dilithium.nbv

assert_dilithium()

prime field of cardinality 2^23 - 2^13 + 1, the ML-DSA modulus

Precompiles
assert_eq!, div_exact!
Used by
dilithium/ext/ext_degree, dilithium/ext/ext_nonresidue, dilithium/lattice/lattice_permutation

Source

# prime field of cardinality 2^23 - 2^13 + 1, the ML-DSA modulus
static NEGONE = 8380416
static MIDPOINT = div_exact! NEGONE, 2

assert_eq! NEGONE * NEGONE, 1
assert_eq! NEGONE + 1, 0
assert_eq! MIDPOINT + MIDPOINT, NEGONE

NEGONE