Module ntt

Module ntt 

Source
Expand description

Number Theoretic Transform Implementation

Generic NTT/iNTT for polynomials over finite fields, with full FIPS-204 compliance for Dilithium and support for Kyber variants.

§Dilithium (FIPS-204)

  • Forward NTT: Algorithm 41 (DIF with standard domain I/O)
  • Inverse NTT: Algorithm 42 (GS with standard domain I/O)
  • Twiddle factors: Precomputed in Montgomery form (ζ·R mod q)
  • Butterfly differences: Kept in [0, 2Q) range as per spec
  • Pointwise multiplication: Standard domain multiplication

§Kyber

  • Cooley-Tukey NTT with on-the-fly twiddle computation
  • Full Montgomery domain processing
  • Pointwise multiplication: Montgomery domain multiplication

Structs§

CooleyTukeyNtt
Cooley-Tukey NTT implementation

Traits§

InverseNttOperator
Inverse Number Theoretic Transform
NttOperator
Forward Number Theoretic Transform

Functions§

montgomery_reduce
Montgomery reduction: computes a * R^-1 mod Q