mldsa_ct1
stdlib/milli/mldsa/mldsa_ct1.nbv only in the milli field
mldsa_ct1(c, t1)
Negacyclic products c * t1_i computed over the native field.
c has coefficients in {-1, 0, 1} and t1 coefficients below 2^10, so every coefficient of the integer product is at most 39 * 1023 in absolute value and the field result is the exact (signed) integer. The NTTs are linear and only the pointwise products create constraints.
- Calls
polynomial/intt_negacyclic,polynomial/ntt_negacyclic,slice- Precompiles
clone!,div_exact!,len!,loop!- Used by
milli/mldsa/mldsa44_w_approx
Source
# Negacyclic products c * t1_i computed over the native field.
#
# c has coefficients in {-1, 0, 1} and t1 coefficients below 2^10, so every
# coefficient of the integer product is at most 39 * 1023 in absolute value
# and the field result is the exact (signed) integer. The NTTs are linear and
# only the pointwise products create constraints.
(c, t1)
static count = div_exact! (len! t1), 256
let c_hat = ntt_negacyclic(c)
let mut out[256 * count]
loop! count, i {
let t_hat = ntt_negacyclic(slice((clone! t1), 256 * i, 256))
let prod = intt_negacyclic((clone! c_hat) * t_hat)
loop! 256, m {
out[256 * i + m] = prod[m]
}
}
out