public class AffineEllipticCurvePoint extends AbstractEllipticCurvePoint
| Constructor and Description |
|---|
AffineEllipticCurvePoint(WeierstrassCurve curve) |
AffineEllipticCurvePoint(WeierstrassCurve curve,
FieldElement x,
FieldElement y) |
AffineEllipticCurvePoint(WeierstrassCurve curve,
Representation repr) |
| Modifier and Type | Method and Description |
|---|---|
AffineEllipticCurvePoint |
add(EllipticCurvePoint P,
FieldElement[] line)
Add this to P with the help of line where line is the result of
this.computeLine(P). |
FieldElement[] |
computeLine(EllipticCurvePoint Q)
Computes a parameterization of the line through this and
Q. |
boolean |
equals(java.lang.Object element) |
GroupElementImpl |
inv()
Calculates the inverse of this group element.
|
boolean |
isNormalized()
Checks whether this point is normalized.
|
AffineEllipticCurvePoint |
normalize()
Normalizes this elliptic curve point.
|
ByteAccumulator |
updateAccumulator(ByteAccumulator accumulator)
Updates the ByteAccumulator with the unique byte representation of this object.
|
getFieldOfDefinition, getRepresentation, getStructure, getX, getY, getZ, hashCode, isNeutralElement, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitoppow, squaregetUniqueByteRepresentationpublic AffineEllipticCurvePoint(WeierstrassCurve curve, FieldElement x, FieldElement y)
public AffineEllipticCurvePoint(WeierstrassCurve curve)
public AffineEllipticCurvePoint(WeierstrassCurve curve, Representation repr)
public AffineEllipticCurvePoint normalize()
EllipticCurvePointpublic GroupElementImpl inv()
GroupElementImplx.op(this).equals(getStructure().getNeutralElement())public AffineEllipticCurvePoint add(EllipticCurvePoint P, FieldElement[] line)
EllipticCurvePointthis.computeLine(P).
The contract is that this.op(P).equals(this.add(P,this.computeLine(P))).
P - the point to addline - the line to use for the additionpublic FieldElement[] computeLine(EllipticCurvePoint Q)
EllipticCurvePointQ.
The result of this function should parameterize the line through this and Q. For example for affine points, a line through P is parameterized by \(a_0, a_1\) with \(a_0(y-yP)-a_1(x-xP)\). For Jacobian points, a line through P is parameterized by \(a_0, a_1\) with \(a_0(yZp^3-Yp)-a_1(xZp^2-Xp)\).
This function is useful to assess the line as an intermediate result of point addition for a an efficient pairing computation.
Q - the second point on the lineQpublic boolean equals(java.lang.Object element)
equals in class java.lang.Objectpublic boolean isNormalized()
EllipticCurvePointpublic ByteAccumulator updateAccumulator(ByteAccumulator accumulator)
UniqueByteRepresentableThe input to the accumulators update function is an injective (with respect to a given domain) byte encoding of this object.
For many use-cases, the AnnotatedUbrUtil can be used to quickly implement this method.