Skip to content

Conversation

@onvej-sl
Copy link
Collaborator

This replaces #2. Unlike that, I've tried to use the cryptography package as much as possible.

Comment on lines +133 to +138
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")
Copy link
Collaborator Author

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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. ISTM that >3.9.0,<3.9.1 is not satisfiable, so only the latter condition makes sense. Or am I misunderstanding the syntax?
  2. Curious, why is 3.14 excluded?
  3. Let's update .github/workflows/python-package.yml accordingly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. ISTM that >3.9.0,<3.9.1 is not satisfiable, so only the latter condition makes sense. Or am I misunderstanding the syntax?
  2. 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.

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.

3 participants