RistrettoPoint class
A class representing a RistrettoPoint, a point on an elliptic curve in the Ristretto255 group, derived from an Edwards curve point.
- Inheritance
-
- Object
- AbstractPoint
- EDPoint
- RistrettoPoint
Constructors
-
RistrettoPoint.fromBytes(List<
int> bytes, {CurveED? curveEdTw}) -
Factory method to create a RistrettoPoint from a byte representation.
factory
- RistrettoPoint.fromEdwardsPoint(EDPoint point)
-
Create a RistrettoPoint from an EdwardsPoint.
factory
-
RistrettoPoint.fromUniform(List<
int> hash) -
Factory method to create a RistrettoPoint from a uniform byte representation.
factory
Properties
- curve ↔ CurveED
-
The Edwards curve associated with this point.
getter/setter pairinherited
- generator ↔ bool
-
Indicates if this point is a generator point.
getter/setter pairinherited
- hashCode → int
-
Calculates the hash code for the Edwards curve point.
no setterinherited
- isInfinity → bool
-
Checks if the Edwards curve point represents the point at infinity.
no setterinherited
- order ↔ BigInt?
-
The order of the point (null if not set).
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- x → BigInt
-
Get the x-coordinate of the Edwards curve point.
no setterinherited
- y → BigInt
-
Get the y-coordinate of the Edwards curve point.
no setterinherited
Methods
-
doublePoint(
) → EDPoint -
Double an Edwards curve point.
inherited
-
getCoords(
) → List< BigInt> -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scale(
) → EDPoint -
Scale the Edwards curve point.
inherited
-
toBytes(
[EncodeType encodeType = EncodeType.comprossed]) → List< int> -
Overrides the 'toBytes' method to convert the RistrettoPoint to a byte array.
override
-
toEdwardBytes(
[EncodeType encodeType = EncodeType.comprossed]) → List< int> - Converts the RistrettoPoint to a byte array in Edwards curve encoding.
-
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) → RistrettoPoint -
Overrides the '*' operator to multiply a RistrettoPoint by another object.
override
-
operator +(
AbstractPoint other) → RistrettoPoint -
Overrides the '+' operator to add a RistrettoPoint to another object.
override
-
operator ==(
Object other) → bool -
Equality operator for comparing two Edwards curve points.
inherited
-
operator unary-(
) → RistrettoPoint -
Overrides the unary negation '-' operator to negate a RistrettoPoint.
override
Static Methods
-
mapToPoint(
BigInt r0) → EDPoint - Maps a BigInt 'r0' to an Edwards curve point (EDPoint).