LongPolynomial5 (Bouncy Castle Library 1.52 API Specification)
Date: 2015-03-01

org.bouncycastle.pqc.math.ntru.polynomial

## Class LongPolynomial5

- java.lang.Object
- - org.bouncycastle.pqc.math.ntru.polynomial.LongPolynomial5

-     public class LongPolynomial5
      extends java.lang.Object

  A polynomial class that combines five coefficients into one `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

    Constructors
    Constructor and Description
    `LongPolynomial5(IntegerPolynomial p)` Constructs a `LongPolynomial5` from a `IntegerPolynomial`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `LongPolynomial5` | `mult(TernaryPolynomial poly2)` Multiplies the polynomial with a `TernaryPolynomial`, taking the indices mod N and the values mod 2048.
    `IntegerPolynomial` | `toIntegerPolynomial()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LongPolynomial5

          public LongPolynomial5(IntegerPolynomial p)

      Constructs a `LongPolynomial5` from a `IntegerPolynomial`. 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 a `TernaryPolynomial`, taking the indices mod N and the values mod 2048.

    - #### toIntegerPolynomial

          public IntegerPolynomial toIntegerPolynomial()