Class MontgomeryCurve<E,F extends Field<E>>
java.lang.Object
dk.jonaslindstrom.ruffini.elliptic.structures.MontgomeryCurve<E,F>
- All Implemented Interfaces:
AdditiveGroup<AffinePoint<E>>
,CommutativeMonoid<AffinePoint<E>>
,Set<AffinePoint<E>>
- Direct Known Subclasses:
Curve25519
public class MontgomeryCurve<E,F extends Field<E>>
extends Object
implements AdditiveGroup<AffinePoint<E>>
Curve on Montgomery form By2 = x3 + Ax2 + x. The field should have
characteristics not equal to 2, A ≠ ∓ 2 and B ≠ 0.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(AffinePoint<E> p, AffinePoint<E> q) Return the result of a+b.boolean
equals
(AffinePoint<E> a, AffinePoint<E> b) Returnstrue
if and only if a = b as elements of this set.getA()
getB()
Pair<ShortWeierstrassCurveAffine<E,
F>, java.util.function.UnaryOperator<AffinePoint<E>>> getField()
negate
(AffinePoint<E> p) Return -a.toString()
toString
(AffinePoint<E> a) Returns a human-readable string representation of an element in this set.zero()
Return the zero element.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.AdditiveGroup
doubling, isZero, scale, scale, subtract, sum
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.CommutativeMonoid
add, add
-
Field Details
-
A
-
B
-
field
-
-
Constructor Details
-
MontgomeryCurve
-
-
Method Details
-
getField
-
discriminant
-
jInvariant
-
toString
Description copied from interface:Set
Returns a human-readable string representation of an element in this set. -
equals
Description copied from interface:Set
Returnstrue
if and only if a = b as elements of this set. -
add
Description copied from interface:CommutativeMonoid
Return the result of a+b.- Specified by:
add
in interfaceCommutativeMonoid<E>
-
negate
Description copied from interface:AdditiveGroup
Return -a.- Specified by:
negate
in interfaceAdditiveGroup<E>
-
zero
Description copied from interface:CommutativeMonoid
Return the zero element.- Specified by:
zero
in interfaceCommutativeMonoid<E>
-
toString
-
getA
-
getB
-
getCorrespondingWeierstrassCurve
public Pair<ShortWeierstrassCurveAffine<E,F>, getCorrespondingWeierstrassCurve()java.util.function.UnaryOperator<AffinePoint<E>>>
-