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

org.bouncycastle.pqc.math.ntru.test

## Class PolynomialTest

- java.lang.Object
- - junit.framework.Assert
  - - junit.framework.TestCase
    - - org.bouncycastle.pqc.math.ntru.test.PolynomialTest

- All Implemented Interfaces:
    junit.framework.Test

      public class PolynomialTest
      extends junit.framework.TestCase

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PolynomialTest()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `testMod3PhiN()`
    `void` | `testModQPhiN()`
    `void` | `testRqMul()`
    `void` | `testRqSumZeroFromBytes()`
    `void` | `testRqSumZeroToBytes()`
    `void` | `testRqToS3()`
    `void` | `testS3FromBytes()`
    `void` | `testS3Mul()`
    `void` | `testS3ToBytes()`
    `void` | `testSqFromBytes()`
    `void` | `testSqMul()`
    `void` | `testSqToBytes()`
    `void` | `testTrinaryZqToZ3()`
    `void` | `testZ3ToZq()`

    - ### Methods inherited from class junit.framework.TestCase

      `assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString`

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

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

- - ### Constructor Detail

    - #### PolynomialTest

          public PolynomialTest()

  - ### Method Detail

    - #### testMod3PhiN

          public void testMod3PhiN()
                            throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### testModQPhiN

          public void testModQPhiN()
                            throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### testSqToBytes

          public void testSqToBytes()
                             throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### testSqFromBytes

          public void testSqFromBytes()
                               throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### testRqSumZeroToBytes

          public void testRqSumZeroToBytes()
                                    throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### testRqSumZeroFromBytes

          public void testRqSumZeroFromBytes()
                                      throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### testS3ToBytes

          public void testS3ToBytes()
                             throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### testS3FromBytes

          public void testS3FromBytes()
                               throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### testSqMul

          public void testSqMul()
                         throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### testRqMul

          public void testRqMul()
                         throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### testS3Mul

          public void testS3Mul()
                         throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### testRqToS3

          public void testRqToS3()
                          throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### testZ3ToZq

          public void testZ3ToZq()
                          throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### testTrinaryZqToZ3

          public void testTrinaryZqToZ3()
                                 throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`