|
Hypercomplex
Abstract & fast header-only C++ template library for lattice-based cryptosystems in high-dimensional algebras
|
#include <cassert>#include <iostream>Go to the source code of this file.
Classes | |
| class | Polynomial< MaxDeg > |
Functions | |
| int64_t | RingInverse (const int64_t x, const int64_t mod) |
| Integer multiplicative inverse in a modular ring. More... | |
| template<const uint64_t MaxDeg> | |
| bool | operator== (const Polynomial< MaxDeg > &P1, const Polynomial< MaxDeg > &P2) |
| Equality operator. More... | |
| template<const uint64_t MaxDeg> | |
| bool | operator!= (const Polynomial< MaxDeg > &P1, const Polynomial< MaxDeg > &P2) |
| Inequality operator. More... | |
| template<const uint64_t MaxDeg> | |
| std::ostream & | operator<< (std::ostream &os, const Polynomial< MaxDeg > &P) |
| Print operator. More... | |
| template<const uint64_t MaxDeg> | |
| Polynomial< MaxDeg > | operator* (const int64_t x, const Polynomial< MaxDeg > &P) |
| Multiplication-by-scalar operator. More... | |
| template<const uint64_t MaxDeg> | |
| Polynomial< MaxDeg > | operator+ (const Polynomial< MaxDeg > &P1, const Polynomial< MaxDeg > &P2) |
| Addition operator. More... | |
| template<const uint64_t MaxDeg> | |
| Polynomial< MaxDeg > | operator- (const Polynomial< MaxDeg > &P1, const Polynomial< MaxDeg > &P2) |
| Subtraction operator. More... | |
| template<const uint64_t MaxDeg> | |
| Polynomial< MaxDeg > | operator* (const Polynomial< MaxDeg > &P1, const Polynomial< MaxDeg > &P2) |
| Convolution multiplication in a polynomial quotient ring operator. More... | |
| template<const uint64_t MaxDeg> | |
| Polynomial< MaxDeg > | operator% (const Polynomial< MaxDeg > &P, const int64_t x) |
| Coefficient reduction modulo a scalar. More... | |
| template<const uint64_t MaxDeg> | |
| void | CenteredLift (Polynomial< MaxDeg > *P, const int64_t mod) |
| Center-lift polynomial in a modular quotient ring. More... | |
| template<const uint64_t MaxDeg> | |
| Polynomial< MaxDeg > | RingInverse (const Polynomial< MaxDeg > &P, const int64_t &mod) |
| Inverse polynomial in a modular quotient ring. More... | |
| void CenteredLift | ( | Polynomial< MaxDeg > * | P, |
| const int64_t | mod | ||
| ) |
Center-lift polynomial in a modular quotient ring.
| [in] | P | existing class instance (pointer) |
| [in] | mod | positive integer |
| bool operator!= | ( | const Polynomial< MaxDeg > & | P1, |
| const Polynomial< MaxDeg > & | P2 | ||
| ) |
Inequality operator.
| [in] | P1 | LHS operand |
| [in] | P2 | RHS operand |
| Polynomial< MaxDeg > operator% | ( | const Polynomial< MaxDeg > & | P, |
| const int64_t | x | ||
| ) |
Coefficient reduction modulo a scalar.
| [in] | P | LHS operand (polynomial) |
| [in] | x | RHS operand (scalar) |
| Polynomial< MaxDeg > operator* | ( | const int64_t | x, |
| const Polynomial< MaxDeg > & | P | ||
| ) |
Multiplication-by-scalar operator.
| [in] | x | LHS operand (scalar) |
| [in] | P | RHS operand (polynomial) |
| Polynomial< MaxDeg > operator* | ( | const Polynomial< MaxDeg > & | P1, |
| const Polynomial< MaxDeg > & | P2 | ||
| ) |
Convolution multiplication in a polynomial quotient ring operator.
| [in] | P1 | LHS operand |
| [in] | P2 | RHS operand |
| Polynomial< MaxDeg > operator+ | ( | const Polynomial< MaxDeg > & | P1, |
| const Polynomial< MaxDeg > & | P2 | ||
| ) |
Addition operator.
| [in] | P1 | LHS operand |
| [in] | P2 | RHS operand |
| Polynomial< MaxDeg > operator- | ( | const Polynomial< MaxDeg > & | P1, |
| const Polynomial< MaxDeg > & | P2 | ||
| ) |
Subtraction operator.
| [in] | P1 | LHS operand |
| [in] | P2 | RHS operand |
| std::ostream & operator<< | ( | std::ostream & | os, |
| const Polynomial< MaxDeg > & | P | ||
| ) |
Print operator.
| [in,out] | os | output stream |
| [in] | P | existing class instance |
| bool operator== | ( | const Polynomial< MaxDeg > & | P1, |
| const Polynomial< MaxDeg > & | P2 | ||
| ) |
Equality operator.
| [in] | P1 | LHS operand |
| [in] | P2 | RHS operand |
| int64_t RingInverse | ( | const int64_t | x, |
| const int64_t | mod | ||
| ) |
Integer multiplicative inverse in a modular ring.
| [in] | x | positive integer |
| [in] | mod | positive integer |
| Polynomial< MaxDeg > RingInverse | ( | const Polynomial< MaxDeg > & | P, |
| const int64_t & | mod | ||
| ) |
Inverse polynomial in a modular quotient ring.
| [in] | P | existing class instance |
| [in] | mod | positive integer |