Skip to main content

Module algebra

Module algebra 

Source
Expand description

Section 2.4. Interpreting the Pseudocode Section 4.2.2. Sampling algorithms Section 4.3. The Number-Theoretic Transform

Structsยง

BaseField
Finite field

Constantsยง

GAMMA ๐Ÿ”’
ZETA_POW_BITREV ๐Ÿ”’
Since the powers of zeta used in the NTT and MultiplyNTTs are 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_q i.e. a tuple of 128 elements of the direct sum components of T_q.
NttVector ๐Ÿ”’
A vector of K NTT-domain polynomials.
Polynomial ๐Ÿ”’
An element of the ring R_q, i.e., a polynomial over Z_q of degree 255
Vector ๐Ÿ”’
A vector of polynomials of length K.