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

Elliptic Curve: ⚠️ breaking❗ rename isInf/setinf to isNeutral/setNeutral and rename generator #399

Merged
merged 3 commits into from
Jun 24, 2024

Conversation

mratsim
Copy link
Owner

@mratsim mratsim commented Jun 24, 2024

This PR is breaking internal API and curves_primitives API.

It:

  • renames generator to setGenerator, this has been introduced yesterday in 8ac73c7 so unlikely to cause external breakage.
  • renames isInf/setInf to isNeutral/setNeutral which external libraries might rely on. The transition is just a find/replace.

Rationale

isInf/setInf are for points at infinity which are technically not on the elliptic curve. But in Constantine it is also conflated with the identity/neutral element.
This is true for short Weierstrass curves but not true for Twisted Edwards curves as the neutral elements ARE on the curve.

To allow generic algorithm like scalar multiplication and multi-scalar-mul, we rename everything to isNeutral/setNeutral

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.

1 participant