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

org.bouncycastle.math.ec

## Class ECFieldElement

- java.lang.Object
- - org.bouncycastle.math.ec.ECFieldElement

- All Implemented Interfaces:
    ECConstants
  Direct Known Subclasses:
    ECFieldElement.AbstractF2m, ECFieldElement.AbstractFp

      public abstract class ECFieldElement
      extends java.lang.Object
      implements ECConstants

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ECFieldElement.AbstractF2m`
    `static class` | `ECFieldElement.AbstractFp`
    `static class` | `ECFieldElement.F2m` Class representing the Elements of the finite field `F2m` in polynomial basis (PB) representation.
    `static class` | `ECFieldElement.Fp`

  - ### Field Summary

    - ### Fields inherited from interface org.bouncycastle.math.ec.ECConstants

      `EIGHT, FOUR, ONE, THREE, TWO, ZERO`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ECFieldElement()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract ECFieldElement` | `add(ECFieldElement b)`
    `abstract ECFieldElement` | `addOne()`
    `int` | `bitLength()`
    `abstract ECFieldElement` | `divide(ECFieldElement b)`
    `void` | `encodeTo(byte[] buf, int off)`
    `byte[]` | `getEncoded()`
    `int` | `getEncodedLength()`
    `abstract java.lang.String` | `getFieldName()`
    `abstract int` | `getFieldSize()`
    `abstract ECFieldElement` | `invert()`
    `boolean` | `isOne()`
    `boolean` | `isZero()`
    `abstract ECFieldElement` | `multiply(ECFieldElement b)`
    `ECFieldElement` | `multiplyMinusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y)`
    `ECFieldElement` | `multiplyPlusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y)`
    `abstract ECFieldElement` | `negate()`
    `abstract ECFieldElement` | `sqrt()`
    `abstract ECFieldElement` | `square()`
    `ECFieldElement` | `squareMinusProduct(ECFieldElement x, ECFieldElement y)`
    `ECFieldElement` | `squarePlusProduct(ECFieldElement x, ECFieldElement y)`
    `ECFieldElement` | `squarePow(int pow)`
    `abstract ECFieldElement` | `subtract(ECFieldElement b)`
    `boolean` | `testBitZero()`
    `abstract java.math.BigInteger` | `toBigInteger()`
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### ECFieldElement

          public ECFieldElement()

  - ### Method Detail

    - #### toBigInteger

          public abstract java.math.BigInteger toBigInteger()

    - #### getFieldName

          public abstract java.lang.String getFieldName()

    - #### getFieldSize

          public abstract int getFieldSize()

    - #### add

          public abstract ECFieldElement add(ECFieldElement b)

    - #### addOne

          public abstract ECFieldElement addOne()

    - #### subtract

          public abstract ECFieldElement subtract(ECFieldElement b)

    - #### multiply

          public abstract ECFieldElement multiply(ECFieldElement b)

    - #### divide

          public abstract ECFieldElement divide(ECFieldElement b)

    - #### negate

          public abstract ECFieldElement negate()

    - #### square

          public abstract ECFieldElement square()

    - #### invert

          public abstract ECFieldElement invert()

    - #### sqrt

          public abstract ECFieldElement sqrt()

    - #### bitLength

          public int bitLength()

    - #### isOne

          public boolean isOne()

    - #### isZero

          public boolean isZero()

    - #### multiplyMinusProduct

          public ECFieldElement multiplyMinusProduct(ECFieldElement b,
                                                     ECFieldElement x,
                                                     ECFieldElement y)

    - #### multiplyPlusProduct

          public ECFieldElement multiplyPlusProduct(ECFieldElement b,
                                                    ECFieldElement x,
                                                    ECFieldElement y)

    - #### squareMinusProduct

          public ECFieldElement squareMinusProduct(ECFieldElement x,
                                                   ECFieldElement y)

    - #### squarePlusProduct

          public ECFieldElement squarePlusProduct(ECFieldElement x,
                                                  ECFieldElement y)

    - #### squarePow

          public ECFieldElement squarePow(int pow)

    - #### testBitZero

          public boolean testBitZero()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getEncoded

          public byte[] getEncoded()

    - #### getEncodedLength

          public int getEncodedLength()

    - #### encodeTo

          public void encodeTo(byte[] buf,
                               int off)