org.bouncycastle.pqc.crypto.mlkem

## Class Poly

- java.lang.Object
- - org.bouncycastle.pqc.crypto.mlkem.Poly

-     class Poly
      extends Object

  Polynomial representation for ML-KEM operations. Provides polynomial arithmetic operations used in lattice-based cryptography.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Poly(MLKEMEngine engine)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCoeffs(Poly b)`
    `static void` | `baseMultMontgomery(Poly r, Poly a, Poly b)`
    `byte[]` | `compressPoly()`
    `void` | `conditionalSubQ()`
    `void` | `convertToMont()`
    `void` | `decompressPoly(byte[] compressedPolyCipherText)`
    `void` | `fromBytes(byte[] inpBytes)`
    `void` | `fromMsg(byte[] msg)`
    `short` | `getCoeffIndex(int i)`
    `short[]` | `getCoeffs()`
    `void` | `getEta1Noise(byte[] seed, byte nonce)`
    `void` | `getEta2Noise(byte[] seed, byte nonce)`
    `void` | `polyInverseNttToMont()`
    `void` | `polyNtt()`
    `void` | `polySubtract(Poly b)`
    `void` | `reduce()`
    `void` | `setCoeffIndex(int i, short val)`
    `void` | `setCoeffs(short[] coeffs)`
    `byte[]` | `toBytes()`
    `byte[]` | `toMsg()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### Poly

          public Poly(MLKEMEngine engine)

  - ### Method Detail

    - #### addCoeffs

          public void addCoeffs(Poly b)

    - #### baseMultMontgomery

          public static void baseMultMontgomery(Poly r,
                                                Poly a,
                                                Poly b)

    - #### compressPoly

          public byte[] compressPoly()

    - #### conditionalSubQ

          public void conditionalSubQ()

    - #### convertToMont

          public void convertToMont()

    - #### decompressPoly

          public void decompressPoly(byte[] compressedPolyCipherText)

    - #### fromBytes

          public void fromBytes(byte[] inpBytes)

    - #### fromMsg

          public void fromMsg(byte[] msg)

    - #### getCoeffIndex

          public short getCoeffIndex(int i)

    - #### getCoeffs

          public short[] getCoeffs()

    - #### getEta1Noise

          public void getEta1Noise(byte[] seed,
                                   byte nonce)

    - #### getEta2Noise

          public void getEta2Noise(byte[] seed,
                                   byte nonce)

    - #### polyInverseNttToMont

          public void polyInverseNttToMont()

    - #### polyNtt

          public void polyNtt()

    - #### polySubtract

          public void polySubtract(Poly b)

    - #### reduce

          public void reduce()

    - #### setCoeffIndex

          public void setCoeffIndex(int i,
                                    short val)

    - #### setCoeffs

          public void setCoeffs(short[] coeffs)

    - #### toBytes

          public byte[] toBytes()

    - #### toMsg

          public byte[] toMsg()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`