Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Supported Mathematical Types

The qFALL-math crate provides types that align closely with mathematical notation, offering core domains and their extensions to matrices and polynomials.

Mathematical DomainMathematical NotationType DescriptionStruct in qFALL-math
Integers\(\mathbb{Z}\)Arbitrarily big integersZ
\(\mathbb{Z}^{n\times m}\)Matrices over \(\mathbb{Z}\)MatZ
\(\mathbb{Z}[X]\)Polynomials over \(\mathbb{Z}\)PolyOverZ
\(\mathbb{Z}[X]^{n \times m}\)Matrices over polynomials over \(\mathbb{Z}\)MatPolyOverZ
Integers Modulo \(q\)\(\mathbb{Z}_q\)Integers modulo a natural number \(q\)Zq
\(\mathbb{Z}_q^{n\times m}\)Matrices over \(\mathbb{Z}_q\)MatZq
\(\mathbb{Z}_q[X]\)Polynomials over \(\mathbb{Z}_q\)PolyOverZq
Polynomial Ring\(\mathbb{Z}_q[X]/f(X)\)Elements of a polynomial ring over \(\mathbb{Z}_q\), where \(f(X)\) is the defining polynomial (often cyclotomic).PolynomialRingZq
\((\mathbb{Z}_q[X]/f(X))^{n \times m}\)Matrices over the polynomial ringMatPolynomialRingZq
Rationals\(\mathbb{Q}\)Arbitrary-precision rationalsQ
\(\mathbb{Q}^{n\times m}\)Matrices over \(\mathbb{Q}\)MatQ
\(\mathbb{Q}[X]\)Polynomials over \(\mathbb{Q}\)PolyOverQ

How is this Section structured?

  1. Basic Types: We show how to instantiate the three base types Z, Zq, and Q, introduce some features and present some arithmetic operations.
  2. Complex Structures: We present more advanced types like MatZ, PolyOverZ, or PolynomialRingZq and give some intuition on working with them.
  3. NTT: We consider how values of PolynomialRingZq can be represented differently (using the Number Theoretic Transform) for more efficient multiplication.