-
- All Implemented Interfaces:
public final class EdwardsPointAn EdwardsPoint represents a point on the Edwards form of Curve25519.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classEdwardsPoint.Companion
-
Field Summary
Fields Modifier and Type Field Description private final BooleanisIdentityprivate final BooleanisSmallOrderprivate final BooleanisTorsionFree
-
Method Summary
Modifier and Type Method Description final BooleanisIdentity()final BooleanisSmallOrder()final BooleanisTorsionFree()final CompressedEdwardsYcompress()Compress this point to CompressedEdwardsY format. final EdwardsPointctSelect(EdwardsPoint that, Integer b)Constant-time selection between two EdwardsPoints. Booleanequals(Object other)Equality check overridden to be constant-time. IntegerhashCode()final EdwardsPointadd(EdwardsPoint q)Point addition. final EdwardsPointsubtract(EdwardsPoint q)Point subtraction. final EdwardsPointnegate()Point negation. final EdwardsPointdouble()Point doubling. final EdwardsPointmultiply(Scalar s)Constant-time variable-base scalar multiplication. final EdwardsPointmultiplyByPow2(Integer k)Compute $2^kP$ by successive doublings. StringtoString()-
-
Method Detail
-
isIdentity
final Boolean isIdentity()
-
isSmallOrder
final Boolean isSmallOrder()
-
isTorsionFree
final Boolean isTorsionFree()
-
compress
final CompressedEdwardsY compress()
Compress this point to CompressedEdwardsY format.
-
ctSelect
final EdwardsPoint ctSelect(EdwardsPoint that, Integer b)
Constant-time selection between two EdwardsPoints.
- Parameters:
that- the other point.b- must be 0 or 1, otherwise results are undefined.
-
equals
Boolean equals(Object other)
Equality check overridden to be constant-time.
Fails fast if the objects are of different types.
-
add
final EdwardsPoint add(EdwardsPoint q)
Point addition.
- Parameters:
q- the point to add to this one.
-
subtract
final EdwardsPoint subtract(EdwardsPoint q)
Point subtraction.
- Parameters:
q- the point to subtract from this one.
-
negate
final EdwardsPoint negate()
Point negation.
-
double
final EdwardsPoint double()
Point doubling.
-
multiply
final EdwardsPoint multiply(Scalar s)
Constant-time variable-base scalar multiplication.
- Parameters:
s- the Scalar to multiply by.
-
multiplyByPow2
final EdwardsPoint multiplyByPow2(Integer k)
Compute $2^kP$ by successive doublings.
- Parameters:
k- the exponent of 2.
-
-
-
-