ProjectiveECCPoint class
Represents a point in projective coordinates on an elliptic curve.
- Inheritance
-
- Object
- AbstractPoint
- ProjectiveECCPoint
Constructors
- ProjectiveECCPoint({required CurveFp curve, required BigInt x, required BigInt y, required BigInt z, BigInt? order, bool generator = false})
-
Constructs a ProjectiveECCPoint from the given coordinates and optional order and generator flag.
The
curveparameter specifies the elliptic curve.x,y, andzare the projective coordinates of the point.orderis the order of the point, andgeneratorindicates if the point is a generator.factory - ProjectiveECCPoint.fromAffine(AbstractPoint point, {bool generator = false})
-
Constructs a ProjectiveECCPoint from an AffinePointt in affine coordinates.
factory
-
ProjectiveECCPoint.fromBytes({required CurveFp curve, required List<
int> data, BigInt? order}) -
Constructs a ProjectiveECCPoint from a byte representation.
The
curveparameter specifies the elliptic curve, anddatais the byte data.orderis the order of the point.factory - ProjectiveECCPoint.infinity(CurveFp curve)
-
Constructs a special ProjectiveECCPoint representing infinity on the elliptic curve.
The
curveparameter specifies the elliptic curve.factory
Properties
- curve → CurveFp
-
The elliptic curve associated with this point.
final
- generator → bool
-
Indicates whether the point is a generator.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isEven → bool
-
no setter
- isInfinity → bool
-
check if point is infinity
no setteroverride
- isOdd → bool
-
no setter
- order → BigInt?
-
The order of the point (can be null if unknown).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- x → BigInt
-
Get the x-coordinate of this point in the projective elliptic curve coordinates.
no setteroverride
- y → BigInt
-
Get the y-coordinate of this point in projective elliptic curve coordinates.
no setteroverride
Methods
-
cast<
T extends AbstractPoint> () → T -
inherited
-
doublePoint(
) → ProjectiveECCPoint -
Doubles a point in projective coordinates on an elliptic curve and returns the result.
override
-
getCoords(
) → List< BigInt> -
mulAdd(
BigInt selfMul, AbstractPoint otherPoint, BigInt otherMul) → ProjectiveECCPoint -
Multiplies this point by a scalar value
selfMuland adds another pointotherPointmultiplied byotherMul. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scale(
) → ProjectiveECCPoint - The coordinates are updated to the scaled values, and the scaled point is returned.
-
toAffine(
) → AffinePointt - Converts the projective point to an affine point.
-
toBytes(
[EncodeType encodeType = EncodeType.comprossed]) → List< int> -
Converts the elliptic curve point to a byte array with the specified encoding type.
The default encoding type is 'compressed'.
inherited
-
toHex(
[EncodeType encodeType = EncodeType.comprossed]) → String -
Encodes the elliptic curve point as a hexadecimal string with the specified encoding type.
The default encoding type is 'compressed'.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toXonly(
) → List< int>
Operators
-
operator *(
BigInt scalar) → ProjectiveECCPoint -
Multiplies this point by a scalar value.
override
-
operator +(
AbstractPoint other) → AbstractPoint -
Adds another point to this point.
override
-
operator ==(
Object other) → bool -
equal operation
override
-
operator unary-(
) → ProjectiveECCPoint