ECCurve.AbstractF2m (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.math.ec

## Class ECCurve.AbstractF2m

- java.lang.Object
- - org.bouncycastle.math.ec.ECCurve
  - - org.bouncycastle.math.ec.ECCurve.AbstractF2m

- Direct Known Subclasses:
    ECCurve.F2m, SecT113R1Curve, SecT113R2Curve, SecT131R1Curve, SecT131R2Curve, SecT163K1Curve, SecT163R1Curve, SecT163R2Curve, SecT193R1Curve, SecT193R2Curve, SecT233K1Curve, SecT233R1Curve, SecT239K1Curve, SecT283K1Curve, SecT283R1Curve, SecT409K1Curve, SecT409R1Curve, SecT571K1Curve, SecT571R1Curve
  Enclosing class:
    ECCurve

      public abstract static class ECCurve.AbstractF2m
      extends ECCurve

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.bouncycastle.math.ec.ECCurve

      `ECCurve.AbstractF2m, ECCurve.AbstractFp, ECCurve.Config, ECCurve.F2m, ECCurve.Fp`

  - ### Field Summary

    - ### Fields inherited from class org.bouncycastle.math.ec.ECCurve

      `a, b, cofactor, coord, COORD_AFFINE, COORD_HOMOGENEOUS, COORD_JACOBIAN, COORD_JACOBIAN_CHUDNOVSKY, COORD_JACOBIAN_MODIFIED, COORD_LAMBDA_AFFINE, COORD_LAMBDA_PROJECTIVE, COORD_SKEWED, endomorphism, field, multiplier, order`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractF2m(int m, int k1, int k2, int k3)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ECPoint` | `createPoint(java.math.BigInteger x, java.math.BigInteger y)`
    `protected ECPoint` | `decompressPoint(int yTilde, java.math.BigInteger X1)` Decompresses a compressed point P = (xp, yp) (X9.62 s 4.2.2).
    `static java.math.BigInteger` | `inverse(int m, int[] ks, java.math.BigInteger x)`
    `boolean` | `isKoblitz()` Returns true if this is a Koblitz curve (ABC curve).
    `boolean` | `isValidFieldElement(java.math.BigInteger x)`
    `ECFieldElement` | `randomFieldElement(java.security.SecureRandom r)`
    `ECFieldElement` | `randomFieldElementMult(java.security.SecureRandom r)`
    `protected ECFieldElement` | `solveQuadraticEquation(ECFieldElement beta)` Solves a quadratic equation `z2 + z = beta`(X9.62 D.1.6) The other solution is `z + 1`.

    - ### Methods inherited from class org.bouncycastle.math.ec.ECCurve

      `checkPoint, checkPoints, checkPoints, cloneCurve, configure, createCacheSafeLookupTable, createDefaultMultiplier, createRawPoint, createRawPoint, decodePoint, equals, equals, fromBigInteger, getA, getAffinePointEncodingLength, getAllCoordinateSystems, getB, getCofactor, getCoordinateSystem, getEndomorphism, getField, getFieldElementEncodingLength, getFieldSize, getInfinity, getMultiplier, getOrder, getPreCompInfo, hashCode, importPoint, normalizeAll, normalizeAll, precompute, supportsCoordinateSystem, validatePoint`

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

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

- - ### Constructor Detail

    - #### AbstractF2m

          protected AbstractF2m(int m,
                                int k1,
                                int k2,
                                int k3)

  - ### Method Detail

    - #### inverse

          public static java.math.BigInteger inverse(int m,
                                                     int[] ks,
                                                     java.math.BigInteger x)

    - #### createPoint

          public ECPoint createPoint(java.math.BigInteger x,
                                     java.math.BigInteger y)

      Overrides:
        `createPoint` in class `ECCurve`

    - #### isValidFieldElement

          public boolean isValidFieldElement(java.math.BigInteger x)

      Specified by:
        `isValidFieldElement` in class `ECCurve`

    - #### randomFieldElement

          public ECFieldElement randomFieldElement(java.security.SecureRandom r)

      Specified by:
        `randomFieldElement` in class `ECCurve`

    - #### randomFieldElementMult

          public ECFieldElement randomFieldElementMult(java.security.SecureRandom r)

      Specified by:
        `randomFieldElementMult` in class `ECCurve`

    - #### decompressPoint

          protected ECPoint decompressPoint(int yTilde,
                                            java.math.BigInteger X1)

      Decompresses a compressed point P = (xp, yp) (X9.62 s 4.2.2).
      Specified by:
        `decompressPoint` in class `ECCurve`
      Parameters:
        `yTilde` - ~yp, an indication bit for the decompression of yp.
        `X1` - The field element xp.
      Returns:
        the decompressed point.

    - #### solveQuadraticEquation

          protected ECFieldElement solveQuadraticEquation(ECFieldElement beta)

      Solves a quadratic equation `z2 + z = beta`(X9.62 D.1.6) The other solution is `z + 1`.
      Parameters:
        `beta` - The value to solve the quadratic equation for.
      Returns:
        the solution for `z2 + z = beta` or `null` if no solution exists.

    - #### isKoblitz

          public boolean isKoblitz()

      Returns true if this is a Koblitz curve (ABC curve).
      Returns:
        true if this is a Koblitz curve (ABC curve), false otherwise