Package net.i2p.crypto.eddsa.math.bigint
Class BigIntegerFieldElement
java.lang.Object
net.i2p.crypto.eddsa.math.FieldElement
net.i2p.crypto.eddsa.math.bigint.BigIntegerFieldElement
- All Implemented Interfaces:
Serializable
public class BigIntegerFieldElement extends FieldElement implements Serializable
A particular element of the field \Z/(2^255-19).
- Author:
- str4d
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description (package private) BigInteger
bi
Variable is package private for encoding. -
Constructor Summary
Constructors Constructor Description BigIntegerFieldElement(Field f, BigInteger bi)
-
Method Summary
Modifier and Type Method Description FieldElement
add(FieldElement val)
FieldElement
addOne()
FieldElement
cmov(FieldElement val, int b)
FieldElement
divide(BigInteger val)
FieldElement
divide(FieldElement val)
boolean
equals(Object obj)
int
hashCode()
FieldElement
invert()
boolean
isNonZero()
FieldElement
mod(FieldElement m)
FieldElement
modPow(FieldElement e, FieldElement m)
FieldElement
multiply(FieldElement val)
FieldElement
negate()
FieldElement
pow(FieldElement e)
FieldElement
pow22523()
FieldElement
square()
FieldElement
squareAndDouble()
FieldElement
subtract(FieldElement val)
FieldElement
subtractOne()
String
toString()
-
Field Details
-
bi
Variable is package private for encoding.
-
-
Constructor Details
-
Method Details
-
isNonZero
public boolean isNonZero()- Specified by:
isNonZero
in classFieldElement
-
add
- Specified by:
add
in classFieldElement
-
addOne
- Overrides:
addOne
in classFieldElement
-
subtract
- Specified by:
subtract
in classFieldElement
-
subtractOne
- Overrides:
subtractOne
in classFieldElement
-
negate
- Specified by:
negate
in classFieldElement
-
divide
- Overrides:
divide
in classFieldElement
-
divide
-
multiply
- Specified by:
multiply
in classFieldElement
-
square
- Specified by:
square
in classFieldElement
-
squareAndDouble
- Specified by:
squareAndDouble
in classFieldElement
-
invert
- Specified by:
invert
in classFieldElement
-
mod
-
modPow
-
pow
-
pow22523
- Specified by:
pow22523
in classFieldElement
-
cmov
- Specified by:
cmov
in classFieldElement
- Since:
- 0.9.36
-
hashCode
public int hashCode() -
equals
-
toString
-