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

Document that infinity must not be passed to ecmult_const #789

Conversation

real-or-random
Copy link
Contributor

No description provided.

@real-or-random real-or-random force-pushed the 202008-ecmult-const-noinf branch from 1c45145 to 2a45b80 Compare August 7, 2020 16:11
@real-or-random
Copy link
Contributor Author

Related to #788.

@gmaxwell
Copy link
Contributor

gmaxwell commented Aug 7, 2020

What happens if you pass in a point at infinity? :)

@gmaxwell
Copy link
Contributor

gmaxwell commented Aug 7, 2020

Ah. Storage type doesn't currently encode infinities so the to precomputed tables have issues. Other than that it looks like it takes a smaller change to fix infinity support, most of which is obviously more correct than not doing it.

@gmaxwell
Copy link
Contributor

gmaxwell commented Aug 8, 2020

Unless I'm mistaken, ecmult isn't constant time with respect to the point input. If so, it could just return infinity in this case. It would be a smaller diff and less weird-surface to handle for future users of the function.

@real-or-random
Copy link
Contributor Author

real-or-random commented Aug 8, 2020

Unless I'm mistaken, ecmult isn't constant time with respect to the point input.

Oh that's a good point. I took the easy way with constant-timeness in mind but yes, it's constant-time in the scalar only.

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

Successfully merging this pull request may close these issues.

2 participants