Skip to content
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

Ch.4 derive y from x #45

Closed
jl2012 opened this issue Nov 1, 2018 · 4 comments
Closed

Ch.4 derive y from x #45

jl2012 opened this issue Nov 1, 2018 · 4 comments

Comments

@jl2012
Copy link

jl2012 commented Nov 1, 2018

After y is derived from x, you need to verify that (x,y) is a valid point of the curve

https://github.com/bitcoin-core/secp256k1/blob/master/src/field_impl.h#L130

@smh69
Copy link

smh69 commented Nov 5, 2018

after derivation of y via x and the curve params, as long as it's done correctly, is it not true that the point must necessarily be on the curve? or am i missing edge cases?

@jl2012
Copy link
Author

jl2012 commented Nov 6, 2018

If and only if x is a valid x

@jimmysong
Copy link
Owner

Oh, good point. Thanks for bringing it to my attention!

@jimmysong
Copy link
Owner

Turns out that the Point class will test to see if (x,y) is on the curve so this is not a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants