Class PolynomialRingGF2m

java.lang.Object
org.bouncycastle.pqc.legacy.math.linearalgebra.PolynomialRingGF2m

public class PolynomialRingGF2m extends Object
This class represents polynomial rings GF(2^m)[X]/p(X) for m<32. If p(X) is irreducible, the polynomial ring is in fact an extension field of GF(2^m).
  • Field Details

    • sqMatrix

      protected PolynomialGF2mSmallM[] sqMatrix
      the squaring matrix for this polynomial ring (given as the array of its row vectors)
    • sqRootMatrix

      protected PolynomialGF2mSmallM[] sqRootMatrix
      the matrix for computing square roots in this polynomial ring (given as the array of its row vectors). This matrix is computed as the inverse of the squaring matrix.
  • Constructor Details

    • PolynomialRingGF2m

      public PolynomialRingGF2m(GF2mField field, PolynomialGF2mSmallM p)
      Constructor.
      Parameters:
      field - the finite field
      p - the reduction polynomial
  • Method Details

    • getSquaringMatrix

      public PolynomialGF2mSmallM[] getSquaringMatrix()
      Returns:
      the squaring matrix for this polynomial ring
    • getSquareRootMatrix

      public PolynomialGF2mSmallM[] getSquareRootMatrix()
      Returns:
      the matrix for computing square roots for this polynomial ring