Package org.bouncycastle.pqc.math.linearalgebra

## Class GF2nONBField

- java.lang.Object
- - org.bouncycastle.pqc.math.linearalgebra.GF2nField
  - - org.bouncycastle.pqc.math.linearalgebra.GF2nONBField

-     public class GF2nONBField
      extends GF2nField

  This class implements the abstract class `GF2nField` for ONB representation. It computes the fieldpolynomial, multiplication matrix and one of its roots mONBRoot, (see for example Certicoms Whitepapers). GF2nField is used by GF2nONBElement which implements the elements of this field.
  See Also:
    `GF2nField`, `GF2nONBElement`

- - ### Field Summary

    - ### Fields inherited from class org.bouncycastle.pqc.math.linearalgebra.GF2nField

      `fieldPolynomial, fields, matrices, mDegree, random`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `GF2nONBField​(int deg, java.security.SecureRandom random)` | constructs an instance of the finite field with 2deg elements and characteristic 2.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `computeCOBMatrix​(GF2nField B1)` | Computes the change-of-basis matrix for basis conversion according to 1363.
    `protected void` | `computeFieldPolynomial()` | Computes the field polynomial for a ONB according to IEEE 1363 A.7.2 (p110f).
    `protected GF2nElement` | `getRandomRoot​(GF2Polynomial polynomial)` | Computes a random root of the given polynomial.

    - ### Methods inherited from class org.bouncycastle.pqc.math.linearalgebra.GF2nField

      `convert, equals, getDegree, getFieldPolynomial, hashCode, invertMatrix`

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

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

- - ### Constructor Detail

    - #### GF2nONBField

          public GF2nONBField​(int deg,
                              java.security.SecureRandom random)
                       throws java.lang.RuntimeException

      constructs an instance of the finite field with 2deg elements and characteristic 2.
      Parameters:
        `deg` - -the extention degree of this field
        `random` - - a source of randomness for generating polynomials on the field.
      Throws:
        `java.lang.RuntimeException`

  - ### Method Detail

    - #### getRandomRoot

          protected GF2nElement getRandomRoot​(GF2Polynomial polynomial)

      Computes a random root of the given polynomial.
      Specified by:
        `getRandomRoot` in class `GF2nField`
      Parameters:
        `polynomial` - a polynomial
      Returns:
        a random root of the polynomial
      See Also:
        "P1363 A.5.6, p103f"

    - #### computeCOBMatrix

          protected void computeCOBMatrix​(GF2nField B1)

      Computes the change-of-basis matrix for basis conversion according to 1363. The result is stored in the lists fields and matrices.
      Specified by:
        `computeCOBMatrix` in class `GF2nField`
      Parameters:
        `B1` - the GF2nField to convert to
      See Also:
        "P1363 A.7.3, p111ff"

    - #### computeFieldPolynomial

          protected void computeFieldPolynomial()

      Computes the field polynomial for a ONB according to IEEE 1363 A.7.2 (p110f).
      Specified by:
        `computeFieldPolynomial` in class `GF2nField`
      See Also:
        "P1363 A.7.2, p110f"