We call a
Point an element of the elliptic curve group, which we can represent with its coordinates. Let's define a
Point class to encapsulate the and coordinates in the generalised curve equation of .
@dataclassclass Point:x: inty: intcurve: EllipticCurvedef __post_init__(self):# Ignore validation for Iif self.x is None and self.y is None:return# Encapsulate int coordinates in FieldElementself.x = FieldElement(self.x, self.curve.field)self.y = FieldElement(self.y, self.curve.field)# Verify if the point satisfies the curve equationif self not in self.curve:raise ValueError