Index Mathematics Conjectures nbv lettuce Widgets

lattice_absorb

stdlib/lattice/lattice_absorb.nbv

lattice_absorb(state_bits, block_bits, static a_absorb)

One compression of the lattice sponge: the new state a_absorb (state_bits || block_bits) for the bits of the current state followed by the bits of a block of lattice_rate elements. Linear in the bits.

Calls
dilithium/lattice/lattice_kappa, lattice/lattice_rate, mat_vec_mul
Precompiles
assert_eq!, concat!, field_bit_width!, len!
Used by
lattice/lattice_digest, typed/typed_lattice_digest_bits

Source

# One compression of the lattice sponge: the new state `a_absorb (state_bits || block_bits)`
# for the bits of the current state followed by the bits of a block of `lattice_rate`
# elements. Linear in the bits.
(state_bits, block_bits, static a_absorb)

static kappa = lattice_kappa()
static rate = lattice_rate()
static e = field_bit_width!
assert_eq! kappa * e, len! state_bits
assert_eq! rate * e, len! block_bits
assert_eq! kappa * e * (kappa + rate), len! a_absorb

mat_vec_mul(a_absorb, concat! state_bits, block_bits)