Class LongPolynomial5
java.lang.Object
org.bouncycastle.pqc.legacy.math.ntru.polynomial.LongPolynomial5
A polynomial class that combines five coefficients into one
Coefficients can be between 0 and 2047 and are stored in bits 0..11, 12..23, ..., 48..59 of a
long
value 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 a
long
number.-
Constructor Summary
ConstructorDescriptionConstructs aLongPolynomial5
from aIntegerPolynomial
. -
Method Summary
Modifier and TypeMethodDescriptionmult
(TernaryPolynomial poly2) Multiplies the polynomial with aTernaryPolynomial
, taking the indices mod N and the values mod 2048.
-
Constructor Details
-
LongPolynomial5
Constructs aLongPolynomial5
from aIntegerPolynomial
. The two polynomials are independent of each other.- Parameters:
p
- the original polynomial. Coefficients must be between 0 and 2047.
-
-
Method Details
-
mult
Multiplies the polynomial with aTernaryPolynomial
, taking the indices mod N and the values mod 2048. -
toIntegerPolynomial
-