Module integer_mod_q

Module integer_mod_q 

Source
Expand description

Types for residue classes over integers with arbitrary length based on Zq.

This module contains the type Zq for integers with arbitrary length modulus q and constructions over it. Each struct provides examples regarding usage. In general you can mix Zq’s with any type of rust integer, whenever the corresponding method takes as input integers of type Into<Z>, e.g. the standard rust integers. The Modulus is constructed as an explicit struct and can be shared across several Zq, MatZq and PolyOverZq instances with efficient memory usage.

Structs§

MatNTTPolynomialRingZq
MatNTTPolynomialRingZq contains the NTT representation of a matrix over polynomials with respect to a NTTBasisPolynomialRingZq that itself isn’t aware of.
MatPolynomialRingZq
MatPolynomialRingZq is a matrix with entries of type PolynomialRingZq.
MatZq
MatZq is a matrix with entries of type Zq.
Modulus
Modulus is a type of a positive integer larger than 1 that is used to do modulus operations.
ModulusPolynomialRingZq
ModulusPolynomialRingZq represents the modulus object for PolynomialRingZq
NTTBasisPolynomialRingZq
NTTBasisPolynomialRingZq is an object, that given a polynomial X^n - 1 mod q or X^n + 1 mod q computes two transformation functions. With these functions, one can utilize efficient matrix multiplication O(n log n) instead of O(n^2) in the trivial polynomial multiplication for PolynomialRingZq objects.
NTTPolynomialRingZq
NTTPolynomialRingZq contains the NTT representation of some polynomial with respect to a NTTBasisPolynomialRingZq that itself isn’t aware of.
PolyOverZq
PolyOverZq is a type of polynomial with arbitrarily many coefficients of type Zq.
PolynomialRingZq
PolynomialRingZq represents polynomials over the finite field PolyOverZq/f(X) where f(X) is a polynomial over Zq.
Zq
Zq is an arbitrary integer value in a residue class.

Enums§

ConvolutionType
This enum only serves the purpose of distinguishing between cycic or negacyclic wrapping in polynomial rings, and more specificially, for the purpose of distinguishing them when utilizing NTT for the polynomial rings.