Uses of Class
net.i2p.crypto.eddsa.math.FieldElement
Package
Description
Data structures that definie curves and fields, and
the mathematical operaions on them.
Low-level, non-optimized implementation using BigIntegers for any curve.
Low-level, optimized implementation using Radix $2^{51}$ for Curve 25519.
-
Uses of FieldElement in net.i2p.crypto.eddsa.math
Modifier and TypeFieldDescriptionfinal FieldElement
Field.EIGHT
final FieldElement
Field.FIVE
final FieldElement
Field.FOUR
final FieldElement
Field.ONE
(package private) final FieldElement
GroupElement.T
Variable is package private only so that tests run.final FieldElement
Field.TWO
(package private) final FieldElement
GroupElement.X
Variable is package private only so that tests run.(package private) final FieldElement
GroupElement.Y
Variable is package private only so that tests run.(package private) final FieldElement
GroupElement.Z
Variable is package private only so that tests run.final FieldElement
Field.ZERO
Modifier and TypeMethodDescriptionabstract FieldElement
FieldElement.add
(FieldElement val) FieldElement.addOne()
abstract FieldElement
FieldElement.cmov
(FieldElement val, int b) abstract FieldElement
Encoding.decode
(byte[] in) Decode a FieldElement from its $(b-1)$-bit encoding.FieldElement.divide
(FieldElement val) Field.fromByteArray
(byte[] x) Curve.get2D()
Curve.getD()
Curve.getI()
Field.getQ()
Field.getQm2()
Field.getQm5d8()
GroupElement.getT()
Gets the $T$ value of the group element.GroupElement.getX()
Gets the $X$ value of the group element.GroupElement.getY()
Gets the $Y$ value of the group element.GroupElement.getZ()
Gets the $Z$ value of the group element.abstract FieldElement
FieldElement.invert()
abstract FieldElement
FieldElement.multiply
(FieldElement val) abstract FieldElement
FieldElement.negate()
abstract FieldElement
FieldElement.pow22523()
abstract FieldElement
FieldElement.square()
abstract FieldElement
FieldElement.squareAndDouble()
abstract FieldElement
FieldElement.subtract
(FieldElement val) FieldElement.subtractOne()
Modifier and TypeMethodDescriptionabstract FieldElement
FieldElement.add
(FieldElement val) 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) FieldElement.divide
(FieldElement val) 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) 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) ModifierConstructorDescriptionCurve
(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
Modifier and TypeClassDescriptionclass
A particular element of the field \Z/(2^255-19).Modifier and TypeMethodDescriptionBigIntegerFieldElement.add
(FieldElement val) BigIntegerFieldElement.addOne()
BigIntegerFieldElement.cmov
(FieldElement val, int b) BigIntegerLittleEndianEncoding.decode
(byte[] in) Decode a FieldElement from its $(b-1)$-bit encoding.BigIntegerFieldElement.divide
(BigInteger val) BigIntegerFieldElement.divide
(FieldElement val) BigIntegerFieldElement.invert()
BigIntegerFieldElement.mod
(FieldElement m) BigIntegerFieldElement.modPow
(FieldElement e, FieldElement m) BigIntegerFieldElement.multiply
(FieldElement val) BigIntegerFieldElement.negate()
BigIntegerFieldElement.pow
(FieldElement e) BigIntegerFieldElement.pow22523()
BigIntegerFieldElement.square()
BigIntegerFieldElement.squareAndDouble()
BigIntegerFieldElement.subtract
(FieldElement val) BigIntegerFieldElement.subtractOne()
Modifier and TypeMethodDescriptionBigIntegerFieldElement.add
(FieldElement val) BigIntegerFieldElement.cmov
(FieldElement val, int b) 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$.BigIntegerFieldElement.mod
(FieldElement m) BigIntegerFieldElement.modPow
(FieldElement e, FieldElement m) BigIntegerFieldElement.multiply
(FieldElement val) BigIntegerFieldElement.pow
(FieldElement e) BigIntegerFieldElement.subtract
(FieldElement val) -
Uses of FieldElement in net.i2p.crypto.eddsa.math.ed25519
Modifier and TypeClassDescriptionclass
Class to represent a field element of the finite field $p = 2^{255} - 19$ elements.Modifier and TypeMethodDescriptionEd25519FieldElement.add
(FieldElement val) $h = f + g$Ed25519FieldElement.cmov
(FieldElement val, int b) Constant-time conditional move.Ed25519LittleEndianEncoding.decode
(byte[] in) Decodes a given field element in its 10 byte $2^{25.5}$ representation.Ed25519FieldElement.invert()
Invert this field element.Ed25519FieldElement.multiply
(FieldElement val) $h = f * g$Ed25519FieldElement.negate()
$h = -f$Ed25519FieldElement.pow22523()
Gets this field element to the power of $(2^{252} - 3)$.Ed25519FieldElement.square()
$h = f * f$Ed25519FieldElement.squareAndDouble()
$h = 2 * f * f$Ed25519FieldElement.subtract
(FieldElement val) $h = f - g$Modifier and TypeMethodDescriptionEd25519FieldElement.add
(FieldElement val) $h = f + g$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?Ed25519FieldElement.multiply
(FieldElement val) $h = f * g$Ed25519FieldElement.subtract
(FieldElement val) $h = f - g$