Expand description
Specialized versions of mq which use AVX2 opcodes (on x86 CPUs).
§Computations modulo q = 12289 (with AVX2 optimizations)
This module implements the same API as the mq module, but leveraging AVX2 opcodes. As such, all functions are tagged “unsafe” and the caller is responsible for checking that AVX2 is supported in the current CPU before calling them.
Re-exports§
pub use super::mq::SQBETA;
Functions§
- mqpoly_
NTT_ ⚠to_ int - Convert a polynomial from NTT to internal representation (in-place).
- mqpoly_
div_ ⚠ntt - Divide polynomial
aby polynomialb; both must be in NTT representation. - mqpoly_
div_ ⚠small - Compute
h = g/f mod X^n+1 mod q. - mqpoly_
ext_ ⚠to_ int - Given a polynomial in external representation, convert it to internal representation (in-place).
- mqpoly_
int_ ⚠to_ NTT - Convert a polynomial from internal representation to NTT (in-place).
- mqpoly_
int_ ⚠to_ ext - Given a polynomial in internal representation, convert it to external representation (in-place).
- mqpoly_
int_ ⚠to_ small - Given a polynomial in internal representation, convert it to small coefficients.
- mqpoly_
mul_ ⚠ntt - Multiply polynomial
aby polynomialb; both must be in NTT representation. - mqpoly_
signed_ ⚠to_ ext - Convert a polynomial with signed coefficients into a polynomial modulo q (external representation).
- mqpoly_
small_ ⚠is_ invertible - Check whether the provided polynomial with small coefficient is
invertible modulo
X^n+1and modulo q. - mqpoly_
small_ ⚠to_ int - Given a polynomial with small coefficients, convert it to internal representation.
- mqpoly_
sqnorm ⚠ - Get the squared norm of a polynomial modulo q (assuming normalization
of coefficients in
[-q/2,+q/2]). - mqpoly_
sub_ ⚠int - Subtract polynomial
bfrom polynomiala; both must be in internal representation, or both must be in NTT representation. - signed_
poly_ ⚠sqnorm - Get the square norm of a polynomial with signed integer coefficients.