RistrettoPoint.fromEdwardsPoint constructor
RistrettoPoint.fromEdwardsPoint(
- EDPoint point
Create a RistrettoPoint from an EdwardsPoint.
This factory method takes an EdwardsPoint 'point' and extracts its coordinates to create a new RistrettoPoint. It inherits various properties from the EdwardsPoint, such as the curve, generator status, and order.
Parameters:
- point: An EdwardsPoint to derive the RistrettoPoint from.
Returns:
- RistrettoPoint: A RistrettoPoint created from the EdwardsPoint.
Implementation
factory RistrettoPoint.fromEdwardsPoint(EDPoint point) {
final coords = point.getCoords();
return RistrettoPoint._(
curve: point.curve,
x: coords[0],
y: coords[1],
z: coords[2],
t: coords[3],
generator: point.generator,
order: point.order);
}