ECFieldElement.Fp (Bouncy Castle Library 1.52 API Specification)
Date: 2015-03-01

org.bouncycastle.math.ec

## Class ECFieldElement.Fp

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

- All Implemented Interfaces:
    ECConstants
  Enclosing class:
    ECFieldElement

      public static class ECFieldElement.Fp
      extends ECFieldElement

- - ### Nested Class Summary

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

      `ECFieldElement.F2m, ECFieldElement.Fp`

  - ### Field Summary

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

      `FOUR, ONE, THREE, TWO, ZERO`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ECFieldElement.Fp(java.math.BigInteger q, java.math.BigInteger x)` Deprecated. Use ECCurve.fromBigInteger to construct field elements

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ECFieldElement` | `add(ECFieldElement b)`
    `ECFieldElement` | `addOne()`
    `ECFieldElement` | `divide(ECFieldElement b)`
    `boolean` | `equals(java.lang.Object other)`
    `java.lang.String` | `getFieldName()` return the field name for this field.
    `int` | `getFieldSize()`
    `java.math.BigInteger` | `getQ()`
    `int` | `hashCode()`
    `ECFieldElement` | `invert()`
    `protected java.math.BigInteger` | `modAdd(java.math.BigInteger x1, java.math.BigInteger x2)`
    `protected java.math.BigInteger` | `modDouble(java.math.BigInteger x)`
    `protected java.math.BigInteger` | `modHalf(java.math.BigInteger x)`
    `protected java.math.BigInteger` | `modHalfAbs(java.math.BigInteger x)`
    `protected java.math.BigInteger` | `modInverse(java.math.BigInteger x)`
    `protected java.math.BigInteger` | `modMult(java.math.BigInteger x1, java.math.BigInteger x2)`
    `protected java.math.BigInteger` | `modReduce(java.math.BigInteger x)`
    `protected java.math.BigInteger` | `modSubtract(java.math.BigInteger x1, java.math.BigInteger x2)`
    `ECFieldElement` | `multiply(ECFieldElement b)`
    `ECFieldElement` | `multiplyMinusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y)`
    `ECFieldElement` | `multiplyPlusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y)`
    `ECFieldElement` | `negate()`
    `ECFieldElement` | `sqrt()` return a sqrt root - the routine verifies that the calculation returns the right value - if none exists it returns null.
    `ECFieldElement` | `square()`
    `ECFieldElement` | `squareMinusProduct(ECFieldElement x, ECFieldElement y)`
    `ECFieldElement` | `squarePlusProduct(ECFieldElement x, ECFieldElement y)`
    `ECFieldElement` | `subtract(ECFieldElement b)`
    `java.math.BigInteger` | `toBigInteger()`

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

      `bitLength, getEncoded, isOne, isZero, testBitZero, toString`

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

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

- - ### Constructor Detail

    - #### ECFieldElement.Fp

          public ECFieldElement.Fp(java.math.BigInteger q,
                           java.math.BigInteger x)

      Deprecated. Use ECCurve.fromBigInteger to construct field elements

  - ### Method Detail

    - #### toBigInteger

          public java.math.BigInteger toBigInteger()

      Specified by:
        `toBigInteger` in class `ECFieldElement`

    - #### getFieldName

          public java.lang.String getFieldName()

      return the field name for this field.
      Specified by:
        `getFieldName` in class `ECFieldElement`
      Returns:
        the string "Fp".

    - #### getFieldSize

          public int getFieldSize()

      Specified by:
        `getFieldSize` in class `ECFieldElement`

    - #### getQ

          public java.math.BigInteger getQ()

    - #### add

          public ECFieldElement add(ECFieldElement b)

      Specified by:
        `add` in class `ECFieldElement`

    - #### addOne

          public ECFieldElement addOne()

      Specified by:
        `addOne` in class `ECFieldElement`

    - #### subtract

          public ECFieldElement subtract(ECFieldElement b)

      Specified by:
        `subtract` in class `ECFieldElement`

    - #### multiply

          public ECFieldElement multiply(ECFieldElement b)

      Specified by:
        `multiply` in class `ECFieldElement`

    - #### multiplyMinusProduct

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

      Overrides:
        `multiplyMinusProduct` in class `ECFieldElement`

    - #### multiplyPlusProduct

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

      Overrides:
        `multiplyPlusProduct` in class `ECFieldElement`

    - #### divide

          public ECFieldElement divide(ECFieldElement b)

      Specified by:
        `divide` in class `ECFieldElement`

    - #### negate

          public ECFieldElement negate()

      Specified by:
        `negate` in class `ECFieldElement`

    - #### square

          public ECFieldElement square()

      Specified by:
        `square` in class `ECFieldElement`

    - #### squareMinusProduct

          public ECFieldElement squareMinusProduct(ECFieldElement x,
                                          ECFieldElement y)

      Overrides:
        `squareMinusProduct` in class `ECFieldElement`

    - #### squarePlusProduct

          public ECFieldElement squarePlusProduct(ECFieldElement x,
                                         ECFieldElement y)

      Overrides:
        `squarePlusProduct` in class `ECFieldElement`

    - #### invert

          public ECFieldElement invert()

      Specified by:
        `invert` in class `ECFieldElement`

    - #### sqrt

          public ECFieldElement sqrt()

      return a sqrt root - the routine verifies that the calculation returns the right value - if none exists it returns null.
      Specified by:
        `sqrt` in class `ECFieldElement`

    - #### modAdd

          protected java.math.BigInteger modAdd(java.math.BigInteger x1,
                                    java.math.BigInteger x2)

    - #### modDouble

          protected java.math.BigInteger modDouble(java.math.BigInteger x)

    - #### modHalf

          protected java.math.BigInteger modHalf(java.math.BigInteger x)

    - #### modHalfAbs

          protected java.math.BigInteger modHalfAbs(java.math.BigInteger x)

    - #### modInverse

          protected java.math.BigInteger modInverse(java.math.BigInteger x)

    - #### modMult

          protected java.math.BigInteger modMult(java.math.BigInteger x1,
                                     java.math.BigInteger x2)

    - #### modReduce

          protected java.math.BigInteger modReduce(java.math.BigInteger x)

    - #### modSubtract

          protected java.math.BigInteger modSubtract(java.math.BigInteger x1,
                                         java.math.BigInteger x2)

    - #### equals

          public boolean equals(java.lang.Object other)

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

    - #### hashCode

          public int hashCode()

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