-
-
Notifications
You must be signed in to change notification settings - Fork 2
Remove ecdsa dependency, use cryptography only II #4
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
base: master
Are you sure you want to change the base?
Conversation
| if self.curve.name == "secp256k1": | ||
| p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F | ||
| elif self.curve.name == "secp256r1": | ||
| p = 0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF | ||
| else: | ||
| raise NotImplementedError(f"Curve {self.curve.name} is not supported") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the implementation of elliptic curves in the cryptography package is only a wrapper over openssl, the package doesn't even export the curves' moduli.
| ecdsa = "*" | ||
| python = ">=3.8,<4.0" | ||
| cryptography = ">=45" | ||
| python = ">3.9.0,<3.9.1 || >3.9.1,<3.14.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ISTM that
>3.9.0,<3.9.1is not satisfiable, so only the latter condition makes sense. Or am I misunderstanding the syntax? - Curious, why is 3.14 excluded?
- Let's update
.github/workflows/python-package.ymlaccordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ISTM that >3.9.0,<3.9.1 is not satisfiable, so only the latter condition makes sense. Or am I misunderstanding the syntax?
- Curious, why is 3.14 excluded?
I don't consider this to be the final solution. I only did what poetry advised me to do in order to upgrade the cryptography package.
This replaces #2. Unlike that, I've tried to use the cryptography package as much as possible.