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.

slip10/utils.py Outdated
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.

pyproject.toml Outdated
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.

@onvej-sl onvej-sl force-pushed the remove-ecda-2 branch 2 times, most recently from e0b0f49 to ecd81f3 Compare January 9, 2026 16:11
@onvej-sl onvej-sl force-pushed the remove-ecda-2 branch 10 times, most recently from b05ea8b to a9c7320 Compare January 12, 2026 15:02
@onvej-sl onvej-sl marked this pull request as ready for review January 13, 2026 11:21
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