AffinePointt class

Represents a point in affine coordinates on an elliptic curve.

Inheritance

Constructors

AffinePointt(CurveFp curve, BigInt x, BigInt y, {BigInt? order})
AffinePointt.infinity(CurveFp curve)
Factory method to create an infinity point on the given curve.
factory

Properties

curve CurveFp
Represents the elliptic curve to which this point belongs.
final
hashCode int
The hash code for this object.
no setteroverride
isInfinity bool
Checks if this AffinePointt represents the point at infinity (O), which is defined by having x and y coordinates both equal to zero.
no setteroverride
order BigInt?
Represents the order of this point, which is the number of times this point can be added to itself before reaching the infinity point.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
x BigInt
Represents the x-coordinate of this point in affine coordinates.
final
y BigInt
Represents the y-coordinate of this point in affine coordinates.
final

Methods

doublePoint() AffinePointt
Doubles the AffinePointt by performing point doubling operation. It computes the new point representing the result of doubling this point on the elliptic curve. If this is the point at infinity, it returns the point at infinity.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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

Operators

operator *(BigInt other) AffinePointt
Overrides the multiplication operator (*) to perform point scalar multiplication. It multiplies the AffinePointt instance by a scalar other and returns a new AffinePointt representing the result.
override
operator +(AbstractPoint other) AbstractPoint
Overrides the addition operator (+) to perform point addition between this AffinePointt and another AbstractPoint. The result is a new AffinePointt. If one of the points is the point at infinity, it returns the other point. If the x-coordinates of both points are equal, and the sum of their y-coordinates modulo curve.p equals zero, the result is the point at infinity. Otherwise, it computes the sum using the provided addition formula.
override
operator ==(Object other) bool
Overrides the equality operator (==) to compare this AffinePointt instance with another object. It returns true if the other object is also an AffinePointt and if the curve, x, and y coordinates match.
override
operator unary-() AffinePointt
Negates this point and returns the result.