Module algebra

Module algebra 

Source
Expand description

Linear algebra with degree-256 polynomials over a prime-order field, vectors of such polynomials, and NTT polynomials / vectors

Structs§

Elem
An Elem is a member of the specified prime-order field. Elements can be added, subtracted, multiplied, and negated, and the overloaded operators will ensure both that the integer values remain in the field, and that the reductions are done efficiently. For addition and subtraction, a simple conditional subtraction is used; for multiplication, Barrett reduction.
NttMatrix
A K x L matrix of NTT-domain polynomials. Each vector represents a row of the matrix, so that multiplying on the right just requires iteration. Multiplication on the right by vectors is the only defined operation, and is only defined when multiplication of NTT polynomials is defined.
NttPolynomial
An NttPolynomial is a member of the NTT algebra T_q = Z_q[X]^256 of 256-tuples of field elements. NTT polynomials can be added and subtracted, negated, and multiplied by scalars. We do not define multiplication of NTT polynomials here. We also do not define the mappings between normal polynomials and NTT polynomials (i.e., between R_q and T_q).
NttVector
An NttVector is a vector of polynomials from T_q of length K. NTT vectors can be added and subtracted. If multiplication is defined for NTT polynomials, then NTT vectors can be multiplied by NTT polynomials, and “multipled” with each other to produce a dot product.
Polynomial
A Polynomial is a member of the ring R_q = Z_q[X] / (X^256) of degree-256 polynomials over the finite field with prime order q. Polynomials can be added, subtracted, negated, and multiplied by field elements. We do not define multiplication of polynomials here.
Vector
A Vector is a vector of polynomials from R_q of length K. Vectors can be added, subtracted, negated, and multiplied by field elements.

Traits§

Field