Expand description
Section 2.4. Interpreting the Pseudocode Section 4.2.2. Sampling algorithms Section 4.3. The Number-Theoretic Transform
Structsยง
- Base
Field - Finite field
Constantsยง
- GAMMA ๐
- ZETA_
POW_ ๐BITREV - Since the powers of zeta used in the
NTTandMultiplyNTTsare fixed, we use pre-computed tables to avoid the need to compute the exponentiations at runtime.
Traitsยง
- Ntt ๐
- The Number Theoretic Transform (NTT) is a variant of the Discrete Fourier Transform (DFT) defined over a finite field that turns costly polynomial multiplications into simple coefficient-wise multiplications modulo a fixed prime.
- NttInverse ๐
- The inverse NTT is the reverse of the Number Theoretic Transform, converting coefficient-wise products back into standard polynomial form while preserving correctness modulo the same prime.
Functionsยง
- base_
case_ ๐multiply - Algorithm 12:
BaseCaseMultiply - matrix_
sample_ ๐ntt - ntt_
inverse_ ๐layer - One layer of the inverse NTT butterfly.
- ntt_
layer ๐ - One layer of the forward NTT butterfly.
- sample_
ntt ๐ - Algorithm 7:
SampleNTT(B) - sample_
poly_ ๐cbd - Algorithm 8:
SamplePolyCBD_eta(B) - sample_
poly_ ๐vec_ cbd
Type Aliasesยง
- Elem ๐
- An element of GF(q).
- Int ๐
- NttMatrix ๐
- A K x K matrix of NTT-domain polynomials. Each vector represents a row of the matrix, so that multiplying on the right just requires iteration.
- NttPolynomial ๐
- An element of the ring
T_qi.e. a tuple of 128 elements of the direct sum components ofT_q. - NttVector ๐
- A vector of K NTT-domain polynomials.
- Polynomial ๐
- An element of the ring
R_q, i.e., a polynomial overZ_qof degree 255 - Vector ๐
- A vector of polynomials of length
K.