Top Methods
org.bouncycastle.pqc.legacy.math.ntru.polynomial

public Interface Polynomial

Known Direct Subinterfaces
org.bouncycastle.pqc.legacy.math.ntru.polynomial.TernaryPolynomial
Known Direct Implementers
org.bouncycastle.pqc.legacy.math.ntru.polynomial.ProductFormPolynomial, org.bouncycastle.pqc.legacy.math.ntru.polynomial.IntegerPolynomial

Method Summary

Modifier and TypeMethod and Description
public IntegerPolynomial

Returns:

the product of the two polynomials
mult
(IntegerPolynomial
a polynomial
poly2
)

Multiplies the polynomial by an IntegerPolynomial, taking the indices mod N.

public IntegerPolynomial

Returns:

the product of the two polynomials
mult
(IntegerPolynomial
a polynomial
poly2
,
int
a modulus to apply
modulus
)

Multiplies the polynomial by an IntegerPolynomial, taking the coefficient values mod modulus and the indices mod N.

public BigIntPolynomial

Returns:

a new polynomial
mult
(BigIntPolynomial
the polynomial to multiply by
poly2
)

Multiplies the polynomial by a BigIntPolynomial, taking the indices mod N.

public IntegerPolynomial

Returns:

a new IntegerPolynomial.
toIntegerPolynomial
()

Returns a polynomial that is equal to this polynomial (in the sense that mult(IntegerPolynomial, int) returns equal IntegerPolynomials).

Method Detail

multback to summary
public IntegerPolynomial mult(IntegerPolynomial poly2)

Multiplies the polynomial by an IntegerPolynomial, taking the indices mod N.

Parameters
poly2:IntegerPolynomial

a polynomial

Returns:IntegerPolynomial

the product of the two polynomials

multback to summary
public IntegerPolynomial mult(IntegerPolynomial poly2, int modulus)

Multiplies the polynomial by an IntegerPolynomial, taking the coefficient values mod modulus and the indices mod N.

Parameters
poly2:IntegerPolynomial

a polynomial

modulus:int

a modulus to apply

Returns:IntegerPolynomial

the product of the two polynomials

multback to summary
public BigIntPolynomial mult(BigIntPolynomial poly2)

Multiplies the polynomial by a BigIntPolynomial, taking the indices mod N. Does not change this polynomial but returns the result as a new polynomial.
Both polynomials must have the same number of coefficients.

Parameters
poly2:BigIntPolynomial

the polynomial to multiply by

Returns:BigIntPolynomial

a new polynomial

toIntegerPolynomialback to summary
public IntegerPolynomial toIntegerPolynomial()

Returns a polynomial that is equal to this polynomial (in the sense that mult(IntegerPolynomial, int) returns equal IntegerPolynomials). The new polynomial is guaranteed to be independent of the original.

Returns:IntegerPolynomial

a new IntegerPolynomial.