Class LongPolynomial5
- java.lang.Object
-
- org.bouncycastle.pqc.math.ntru.polynomial.LongPolynomial5
-
public class LongPolynomial5 extends java.lang.ObjectA polynomial class that combines five coefficients into onelongvalue for faster multiplication by a ternary polynomial.
Coefficients can be between 0 and 2047 and are stored in bits 0..11, 12..23, ..., 48..59 of alongnumber.
-
-
Constructor Summary
Constructors Constructor Description LongPolynomial5(IntegerPolynomial p)Constructs aLongPolynomial5from aIntegerPolynomial.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LongPolynomial5mult(TernaryPolynomial poly2)Multiplies the polynomial with aTernaryPolynomial, taking the indices mod N and the values mod 2048.IntegerPolynomialtoIntegerPolynomial()
-
-
-
Constructor Detail
-
LongPolynomial5
public LongPolynomial5(IntegerPolynomial p)
Constructs aLongPolynomial5from aIntegerPolynomial. The two polynomials are independent of each other.- Parameters:
p- the original polynomial. Coefficients must be between 0 and 2047.
-
-
Method Detail
-
mult
public LongPolynomial5 mult(TernaryPolynomial poly2)
Multiplies the polynomial with aTernaryPolynomial, taking the indices mod N and the values mod 2048.
-
toIntegerPolynomial
public IntegerPolynomial toIntegerPolynomial()
-
-