nttmul
- :
c =nttmul(a, b, p)¶ Exact polynomial multiplication modulo prime p via NTT.
a and b are coefficient vectors in the same order as for
conv. Returnsmod (conv (a, b), p)computed asintt (ntt (a) .* ntt (b))with a transform length at leastnumel (a) + numel (b) - 1that divides p-1.This is exact over GF(p) (no floating-point round-off), which is the purpose of the number-theoretic transform for polynomial products.