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

fix add_assign for ProjectivePoint #543

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

tcoratger
Copy link
Collaborator

At the moment, when using add_assign for ProjectivePoint, the case P + (-P) was not taken into account, leading to 2P instead of infinity point.

For this purpose a piece of logic is added to check, during P1 + P2 addition and in the case where x1 = x2, if y1 = y2 (should return point doubling) or if y1 = -y2 (should return infinity point).

Also some of the logic on other implementations of add_assign is simplified to remove some useless code.

Copy link
Owner

@xJonathanLEI xJonathanLEI left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks! Will make a patch release for starknet-curve right away.

@xJonathanLEI xJonathanLEI merged commit 56fe578 into xJonathanLEI:master Feb 15, 2024
24 checks passed
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.

2 participants