polyinvntttomont function

void polyinvntttomont(
  1. Poly a
)

Inverse NTT transform of a polynomial, in the Montgomery domain, with the result reduced modulo q.

The input polynomial a is transformed in-place. The output is a new polynomial in the standard domain that is the inverse NTT transform of the input polynomial.

This function is the inverse of polyntt. It uses the precomputed zetas for the inverse NTT and then normalizes the output by multiplying each coefficient by nInv (computed in ntt.dart), as described in the reference implementation (PQClean) and the Kyber specification.

Implementation

void polyinvntttomont(Poly a) {
  a.coeffs = invntt(a.coeffs);
  // In PQClean, nInv is already multiplied inside invntt, we did the same here.
}