Closed olalonde closed 4 years ago
I would speed up the whole is_point_on_curve thing :
left = pow(y, 2, self.p)
right = pow(x,3,p) + (self.a * x) + self.b
return left == right % self.p
Agree with @antonio-fr that we should try to keep is_point_on_curve
as cheap as possible since it's used whenever a new Point
is constructed. If possible we should avoid modular square roots.
Based on looking at #48 some more I'm actually leaning towards closing this. Let me know if you agree with my comments in #48, it appears to me the logic is sound and correctly catching an invalid point.
Closing per the last comment left in issue #48. Let me know if you want to discuss further.
See issue #48