Module mq_avx2

Module mq_avx2 

Source
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 a by polynomial b; 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 a by polynomial b; 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+1 and 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 b from polynomial a; 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.