Package net.i2p.crypto.eddsa.math
Class FieldElement
java.lang.Object
net.i2p.crypto.eddsa.math.FieldElement
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BigIntegerFieldElement
,Ed25519FieldElement
Note: concrete subclasses must implement hashCode() and equals()
- Since:
- 0.9.15
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract FieldElement
add
(FieldElement val) addOne()
abstract FieldElement
cmov
(FieldElement val, int b) divide
(FieldElement val) abstract FieldElement
invert()
boolean
abstract boolean
abstract FieldElement
multiply
(FieldElement val) abstract FieldElement
negate()
abstract FieldElement
pow22523()
abstract FieldElement
square()
abstract FieldElement
abstract FieldElement
subtract
(FieldElement val) byte[]
Encode a FieldElement in its $(b-1)$-bit encoding.
-
Field Details
-
f
-
-
Constructor Details
-
FieldElement
-
-
Method Details
-
toByteArray
public byte[] toByteArray()Encode a FieldElement in its $(b-1)$-bit encoding.- Returns:
- the $(b-1)$-bit encoding of this FieldElement.
-
isNonZero
public abstract boolean isNonZero() -
isNegative
public boolean isNegative() -
add
-
addOne
-
subtract
-
subtractOne
-
negate
-
divide
-
multiply
-
square
-
squareAndDouble
-
invert
-
pow22523
-
cmov
- Since:
- 0.9.36
-