-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify guarantees in traits around point validity #27
Comments
One idea would be to put these methods in |
Good point! In my opinion, the current methods are useful and needed so I'd leave them as is. |
We now have a (These methods were anyway methods on the structs, and not part of the corresponding traits.) |
The elliptic curve point API's (AffineCurve, ProjectiveCurve) currently claim that the interface should be providing quite strong guarantees, all points should be on the curve, and moreover in the prime order subgroup.
However this guarantee isn't achieved at the moment.
I've only looked at short weierstrass jacobian curves so far (which encompasses the BLS12 curves), and they don't guarantee that points are on the curve, or that they are in the prime order subgroup for AffineCurve.
The
new()
method for AffineGroup (which implements AffineCurve) does not ensure that points are on the curve.Also the sw curve's Affine Curve implementation of
from_random_bytes()
usesget_point_from_x()
, which as stated in its comments provides no guarantees around being in the prime order subgroup.I believe that the trait comments should drop the description that they are in the prime order subgroup, and we should have new traits that enforce that this is the case. (Or alternatively, make the two above methods enforce the claimed properties)
The text was updated successfully, but these errors were encountered: