HPS4096Polynomial (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.pqc.math.ntru

## Class HPS4096Polynomial

- java.lang.Object
- - org.bouncycastle.pqc.math.ntru.Polynomial
  - - org.bouncycastle.pqc.math.ntru.HPSPolynomial
    - - org.bouncycastle.pqc.math.ntru.HPS4096Polynomial

-     public class HPS4096Polynomial
      extends HPSPolynomial

  Polynomial class for HPS parameters with q = 4096

- - ### Field Summary

    - ### Fields inherited from class org.bouncycastle.pqc.math.ntru.Polynomial

      `coeffs, params`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HPS4096Polynomial(NTRUHPSParameterSet params)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `sqFromBytes(byte[] a)` Unpack a Sq polynomial
    `byte[]` | `sqToBytes(int len)` Pack Sq polynomial as a byte array

    - ### Methods inherited from class org.bouncycastle.pqc.math.ntru.HPSPolynomial

      `lift`

    - ### Methods inherited from class org.bouncycastle.pqc.math.ntru.Polynomial

      `mod3PhiN, modQPhiN, r2Inv, rqInv, rqMul, rqSumZeroFromBytes, rqSumZeroToBytes, rqToS3, s3FromBytes, s3Inv, s3Mul, s3ToBytes, s3ToBytes, sqMul, trinaryZqToZ3, z3ToZq`

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

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

- - ### Constructor Detail

    - #### HPS4096Polynomial

          public HPS4096Polynomial(NTRUHPSParameterSet params)

  - ### Method Detail

    - #### sqToBytes

          public byte[] sqToBytes(int len)

      Description copied from class: `Polynomial`
      Pack Sq polynomial as a byte array
      Overrides:
        `sqToBytes` in class `HPSPolynomial`
      Parameters:
        `len` - array length of packed polynomial
      Returns:
      See Also:
        NTRU specification section 1.8.5

    - #### sqFromBytes

          public void sqFromBytes(byte[] a)

      Description copied from class: `Polynomial`
      Unpack a Sq polynomial
      Overrides:
        `sqFromBytes` in class `HPSPolynomial`
      Parameters:
        `a` - byte array of packed polynomial
      See Also:
        NTRU specification section 1.8.6