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

Curves interfaces consistency #5

Merged
merged 8 commits into from
Apr 7, 2020

Conversation

AntoineRondelet
Copy link
Contributor

The interfaces of the various curves was not consistent which led errors if we tried to switch curves.
For instance, the coordinates were represented as private attributes X_, Y_, Z_ in the MNT curves, which could be accessed via the getters X(), Y(), Z().

For the alt_bn128 curve however, these attributes were public and named X, Y, Z.
This inconsistency in the interface requires to change the code base of a project if one switches the curve.

See: https://github.com/clearmatics/zeth/pull/181/files for an example of project that is affected by this.

This PR fixes the above issue.

@AntoineRondelet
Copy link
Contributor Author

See also: scipr-lab/libff#35

@AntoineRondelet AntoineRondelet requested a review from dtebbs April 2, 2020 17:19
Copy link
Contributor

@dtebbs dtebbs left a comment

Choose a reason for hiding this comment

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

Travis also seems to have broken (by changes on their side). This (as well as the pointer change) is addressed in #6

Remove unnecessary extra pointer in fill_coord
@AntoineRondelet
Copy link
Contributor Author

Will wait for the build to pass, and will point libff submodules to this branch on other projects to make sure that nothing breaks. Will merge after that.

@AntoineRondelet
Copy link
Contributor Author

Merging this PR as I have updated the submodules on other repos and did the appropriate changes in libsnark.

@AntoineRondelet AntoineRondelet merged commit b2a94ff into master Apr 7, 2020
@AntoineRondelet AntoineRondelet deleted the curves-interfaces-consistency branch May 27, 2021 08:34
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