Expand description
Modular and polynomial arithmetic.
See the examples in the repo.
Modules§
- matrix
- Matrices of ring elements or polynomials.
- ntt
- Number-Theoretic Transform (NTT) is kind of a discrete Fourier Transform that transforms a polynomial to the NTT domain, where multiplication can be done efficiently in O(N) instead of O(N^2). Addition can also be performed efficiently in the NTT domain. The
NttDomainstruct ensures mathematical soundness and domains are not used together. - poly
- Macros and traits for polynomial quotient ring over modular rings, (Z/qZ)[x]/(x^N+1).
- ring
- Macros and traits for modular rings Z/qZ.
- vector
- Vector types that can contain modular scalars (
Ring) or polynomials (Poly). Matrices must not be implemented as vectors of vectors; use thematrixmodule instead.
Macros§
- poly
- Implement a modular polynomial ring over a field
- poly2
- Implement a modular polynomial ring with modulus 2q
- ring
- Implement a modular ring