## Uses of Class
net.i2p.crypto.eddsa.math.FieldElement

- Packages that use FieldElement
  Package | Description
  --- | ---
  net.i2p.crypto.eddsa.math | Data structures that define curves and fields, and the mathematical operations on them.
  net.i2p.crypto.eddsa.math.bigint | Generic mathematical implementation using Java BigIntegers for arbitrary elliptic curves.
  net.i2p.crypto.eddsa.math.ed25519 | High-performance, optimized mathematical implementation for Ed25519 using Radix 2^51 representation.

- - ### Uses of FieldElement in net.i2p.crypto.eddsa.math

    Fields in net.i2p.crypto.eddsa.math declared as FieldElement
    Modifier and Type | Field and Description
    --- | ---
    `FieldElement` | Field.`EIGHT`
    `FieldElement` | Field.`FIVE`
    `FieldElement` | Field.`FOUR`
    `FieldElement` | Field.`ONE`
    `(package private) FieldElement` | GroupElement.`T` Variable is package private only so that tests run.
    `FieldElement` | Field.`TWO`
    `(package private) FieldElement` | GroupElement.`X` Variable is package private only so that tests run.
    `(package private) FieldElement` | GroupElement.`Y` Variable is package private only so that tests run.
    `(package private) FieldElement` | GroupElement.`Z` Variable is package private only so that tests run.
    `FieldElement` | Field.`ZERO`

    Methods in net.i2p.crypto.eddsa.math that return FieldElement
    Modifier and Type | Method and Description
    --- | ---
    `abstract FieldElement` | FieldElement.`add(FieldElement val)` Adds another field element to this one.
    `FieldElement` | FieldElement.`addOne()` Adds one to this field element.
    `abstract FieldElement` | FieldElement.`cmov(FieldElement val, int b)` Conditional move - sets this element to val if b is 1, otherwise leaves it unchanged.
    `abstract FieldElement` | Encoding.`decode(byte[] in)` Decode a FieldElement from its $(b-1)$-bit encoding.
    `FieldElement` | FieldElement.`divide(FieldElement val)` Divides this field element by another one.
    `FieldElement` | Field.`fromByteArray(byte[] x)`
    `FieldElement` | Curve.`get2D()`
    `FieldElement` | Curve.`getD()`
    `FieldElement` | Curve.`getI()`
    `FieldElement` | Field.`getQ()`
    `FieldElement` | Field.`getQm2()`
    `FieldElement` | Field.`getQm5d8()`
    `FieldElement` | GroupElement.`getT()` Gets the $T$ value of the group element.
    `FieldElement` | GroupElement.`getX()` Gets the $X$ value of the group element.
    `FieldElement` | GroupElement.`getY()` Gets the $Y$ value of the group element.
    `FieldElement` | GroupElement.`getZ()` Gets the $Z$ value of the group element.
    `abstract FieldElement` | FieldElement.`invert()` Computes the multiplicative inverse of this field element.
    `abstract FieldElement` | FieldElement.`multiply(FieldElement val)` Multiplies this field element by another one.
    `abstract FieldElement` | FieldElement.`negate()` Negates this field element.
    `abstract FieldElement` | FieldElement.`pow22523()` Raises this field element to the power of $2^{252} - 3$.
    `abstract FieldElement` | FieldElement.`square()` Squares this field element.
    `abstract FieldElement` | FieldElement.`squareAndDouble()` Squares this field element and doubles the result.
    `abstract FieldElement` | FieldElement.`subtract(FieldElement val)` Subtracts another field element from this one.
    `FieldElement` | FieldElement.`subtractOne()` Subtracts one from this field element.

    Methods in net.i2p.crypto.eddsa.math with parameters of type FieldElement
    Modifier and Type | Method and Description
    --- | ---
    `abstract FieldElement` | FieldElement.`add(FieldElement val)` Adds another field element to this one.
    `static GroupElement` | GroupElement.`cached(Curve curve, FieldElement YpX, FieldElement YmX, FieldElement Z, FieldElement T2d)` Creates a new group element in CACHED representation.
    `abstract FieldElement` | FieldElement.`cmov(FieldElement val, int b)` Conditional move - sets this element to val if b is 1, otherwise leaves it unchanged.
    `FieldElement` | FieldElement.`divide(FieldElement val)` Divides this field element by another one.
    `abstract byte[]` | Encoding.`encode(FieldElement x)` Encode a FieldElement in its $(b-1)$-bit encoding.
    `abstract boolean` | Encoding.`isNegative(FieldElement x)` From the Ed25519 paper: $x$ is negative if the $(b-1)$-bit encoding of $x$ is lexicographically larger than the $(b-1)$-bit encoding of -x.
    `abstract FieldElement` | FieldElement.`multiply(FieldElement val)` Multiplies this field element by another one.
    `static GroupElement` | GroupElement.`p1p1(Curve curve, FieldElement X, FieldElement Y, FieldElement Z, FieldElement T)` Creates a new group element in P1P1 representation.
    `static GroupElement` | GroupElement.`p2(Curve curve, FieldElement X, FieldElement Y, FieldElement Z)` Creates a new group element in P2 representation.
    `static GroupElement` | GroupElement.`p3(Curve curve, FieldElement X, FieldElement Y, FieldElement Z, FieldElement T)` Creates a new group element in P3 representation, without pre-computation.
    `static GroupElement` | GroupElement.`p3(Curve curve, FieldElement X, FieldElement Y, FieldElement Z, FieldElement T, boolean precomputeDoubleOnly)` Creates a new group element in P3 representation, potentially with pre-computation.
    `static GroupElement` | GroupElement.`precomp(Curve curve, FieldElement ypx, FieldElement ymx, FieldElement xy2d)` Creates a new group element in PRECOMP representation.
    `abstract FieldElement` | FieldElement.`subtract(FieldElement val)` Subtracts another field element from this one.

    Constructors in net.i2p.crypto.eddsa.math with parameters of type FieldElement
    Constructor and Description
    `Curve(Field f, byte[] d, FieldElement I)`
    `GroupElement(Curve curve, GroupElement.Representation repr, FieldElement X, FieldElement Y, FieldElement Z, FieldElement T)` Creates a group element for a curve, without any pre-computation.
    `GroupElement(Curve curve, GroupElement.Representation repr, FieldElement X, FieldElement Y, FieldElement Z, FieldElement T, boolean precomputeDouble)` Creates a group element for a curve, with optional pre-computation.

  - ### Uses of FieldElement in net.i2p.crypto.eddsa.math.bigint

    Subclasses of FieldElement in net.i2p.crypto.eddsa.math.bigint
    Modifier and Type | Class and Description
    --- | ---
    `class` | `BigIntegerFieldElement` A particular element of the field \Z/(2^255-19).

    Methods in net.i2p.crypto.eddsa.math.bigint that return FieldElement
    Modifier and Type | Method and Description
    --- | ---
    `FieldElement` | BigIntegerFieldElement.`add(FieldElement val)`
    `FieldElement` | BigIntegerFieldElement.`addOne()`
    `FieldElement` | BigIntegerFieldElement.`cmov(FieldElement val, int b)`
    `FieldElement` | BigIntegerLittleEndianEncoding.`decode(byte[] in)` Decode a FieldElement from its $(b-1)$-bit encoding.
    `FieldElement` | BigIntegerFieldElement.`divide(BigInteger val)`
    `FieldElement` | BigIntegerFieldElement.`divide(FieldElement val)`
    `FieldElement` | BigIntegerFieldElement.`invert()`
    `FieldElement` | BigIntegerFieldElement.`mod(FieldElement m)`
    `FieldElement` | BigIntegerFieldElement.`modPow(FieldElement e, FieldElement m)`
    `FieldElement` | BigIntegerFieldElement.`multiply(FieldElement val)`
    `FieldElement` | BigIntegerFieldElement.`negate()`
    `FieldElement` | BigIntegerFieldElement.`pow(FieldElement e)`
    `FieldElement` | BigIntegerFieldElement.`pow22523()`
    `FieldElement` | BigIntegerFieldElement.`square()`
    `FieldElement` | BigIntegerFieldElement.`squareAndDouble()`
    `FieldElement` | BigIntegerFieldElement.`subtract(FieldElement val)`
    `FieldElement` | BigIntegerFieldElement.`subtractOne()`

    Methods in net.i2p.crypto.eddsa.math.bigint with parameters of type FieldElement
    Modifier and Type | Method and Description
    --- | ---
    `FieldElement` | BigIntegerFieldElement.`add(FieldElement val)`
    `FieldElement` | BigIntegerFieldElement.`cmov(FieldElement val, int b)`
    `FieldElement` | BigIntegerFieldElement.`divide(FieldElement val)`
    `byte[]` | BigIntegerLittleEndianEncoding.`encode(FieldElement x)`
    `boolean` | BigIntegerLittleEndianEncoding.`isNegative(FieldElement x)` From the Ed25519 paper: $x$ is negative if the $(b-1)$-bit encoding of $x$ is lexicographically larger than the $(b-1)$-bit encoding of $-x$.
    `FieldElement` | BigIntegerFieldElement.`mod(FieldElement m)`
    `FieldElement` | BigIntegerFieldElement.`modPow(FieldElement e, FieldElement m)`
    `FieldElement` | BigIntegerFieldElement.`multiply(FieldElement val)`
    `FieldElement` | BigIntegerFieldElement.`pow(FieldElement e)`
    `FieldElement` | BigIntegerFieldElement.`subtract(FieldElement val)`

  - ### Uses of FieldElement in net.i2p.crypto.eddsa.math.ed25519

    Subclasses of FieldElement in net.i2p.crypto.eddsa.math.ed25519
    Modifier and Type | Class and Description
    --- | ---
    `class` | `Ed25519FieldElement` Class to represent a field element of the finite field $p = 2^{255} - 19$ elements.

    Methods in net.i2p.crypto.eddsa.math.ed25519 that return FieldElement
    Modifier and Type | Method and Description
    --- | ---
    `FieldElement` | Ed25519FieldElement.`add(FieldElement val)` $h = f + g$
    `FieldElement` | Ed25519FieldElement.`cmov(FieldElement val, int b)` Constant-time conditional move.
    `FieldElement` | Ed25519LittleEndianEncoding.`decode(byte[] in)` Decodes a given field element in its 10 byte $2^{25.5}$ representation.
    `FieldElement` | Ed25519FieldElement.`invert()` Invert this field element.
    `FieldElement` | Ed25519FieldElement.`multiply(FieldElement val)` $h = f * g$
    `FieldElement` | Ed25519FieldElement.`negate()` $h = -f$
    `FieldElement` | Ed25519FieldElement.`pow22523()` Gets this field element to the power of $(2^{252} - 3)$.
    `FieldElement` | Ed25519FieldElement.`square()` $h = f * f$
    `FieldElement` | Ed25519FieldElement.`squareAndDouble()` $h = 2 * f * f$
    `FieldElement` | Ed25519FieldElement.`subtract(FieldElement val)` $h = f - g$

    Methods in net.i2p.crypto.eddsa.math.ed25519 with parameters of type FieldElement
    Modifier and Type | Method and Description
    --- | ---
    `FieldElement` | Ed25519FieldElement.`add(FieldElement val)` $h = f + g$
    `FieldElement` | Ed25519FieldElement.`cmov(FieldElement val, int b)` Constant-time conditional move.
    `byte[]` | Ed25519LittleEndianEncoding.`encode(FieldElement x)` Encodes a given field element in its 32 byte representation.
    `boolean` | Ed25519LittleEndianEncoding.`isNegative(FieldElement x)` Is the FieldElement negative in this encoding?
    `FieldElement` | Ed25519FieldElement.`multiply(FieldElement val)` $h = f * g$
    `FieldElement` | Ed25519FieldElement.`subtract(FieldElement val)` $h = f - g$