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

Be more explicit with the curve in arithmetic operations #126

Open
tuxxy opened this issue Apr 23, 2018 · 0 comments
Open

Be more explicit with the curve in arithmetic operations #126

tuxxy opened this issue Apr 23, 2018 · 0 comments

Comments

@tuxxy
Copy link
Contributor

tuxxy commented Apr 23, 2018

What's the issue?

  1. When performing arithmetic operations on curve dependent variables (e.g. Point.__mul__), we assume that the curve is the whatever the first variable is.
  2. OpenSSL already checks that the inputs are valid for the given curve when performing curve arithmetic, but we should be much more explicit.

How to resolve?

  1. Check the curve (via its curve_nid) for each variable in the arithmetic before performing the operation. If the curves do not match, do not perform the operation and raise a TypeError (or other more related error).
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

1 participant