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

separate affine_t and add some utility to ec/ #29

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sandsentinel
Copy link
Collaborator

Should be backwards compatible.


#ifndef NDEBUG
friend inline bool operator==(const jacobian_t& a, const jacobian_t& b)
{ return (a.X == b.X) && (a.Y == b.Y) && (a.Z == b.Z); }
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not how you compare points in Jacobian coordinates for equality. See POINT_IS_EQUAL_IMPL for a template. Same naturally applies to the inequality test, which should read just !(a == b). Or maybe compiler does it for you without having to define operator!=?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is not how you compare points in Jacobian coordinates for equality.

Right, same thing with xyzz_t. I'll fix both.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should be fixed now for both jacobian_t and xyzz_t, thanks! I also removed __device__ from == and != because I realised mont_t didn't have them and thought it would be better to leave it to a later time.

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