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§
- MatNTT
Polynomial Ring Zq MatNTTPolynomialRingZqcontains the NTT representation of a matrix over polynomials with respect to aNTTBasisPolynomialRingZqthat itself isn’t aware of.- MatPolynomial
Ring Zq MatPolynomialRingZqis a matrix with entries of typePolynomialRingZq.- MatZq
MatZqis a matrix with entries of typeZq.- Modulus
Modulusis a type of a positive integer larger than1that is used to do modulus operations.- Modulus
Polynomial Ring Zq ModulusPolynomialRingZqrepresents the modulus object forPolynomialRingZq- NTTBasis
Polynomial Ring Zq NTTBasisPolynomialRingZqis an object, that given a polynomialX^n - 1 mod qorX^n + 1 mod qcomputes 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 forPolynomialRingZqobjects.- NTTPolynomial
Ring Zq NTTPolynomialRingZqcontains the NTT representation of some polynomial with respect to aNTTBasisPolynomialRingZqthat itself isn’t aware of.- Poly
Over Zq PolyOverZqis a type of polynomial with arbitrarily many coefficients of typeZq.- Polynomial
Ring Zq PolynomialRingZqrepresents polynomials over the finite fieldPolyOverZq/f(X) where f(X) is a polynomial overZq.- Zq
Zqis an arbitrary integer value in a residue class.
Enums§
- Convolution
Type - 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.