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

Refactor BN curves. #105

Open
davidnevadoc opened this issue Nov 23, 2023 · 1 comment
Open

Refactor BN curves. #105

davidnevadoc opened this issue Nov 23, 2023 · 1 comment
Assignees

Comments

@davidnevadoc
Copy link
Contributor

The BN curves Pluto and bn256 can a good amount of code that is currently duplicated (once #98 is merged). In order to fix this we should introduce macros for:

  • Field extensions.
  • BN pairing.

This will be a good opportunity to refactor some of bn256 code which is in many parts undocumente and at times quite unclear.

@mratsim
Copy link
Contributor

mratsim commented Nov 29, 2023

Ideally I would also do renaming/breaking changes:

  • rename to bn254
  • Engine is a very bad name for the pairing trait and it should be called Pairing:
    impl Engine for Bn256 {
    type Fr = Fr;
    type G1 = G1;
    type G1Affine = G1Affine;
    type G2 = G2;
    type G2Affine = G2Affine;
    type Gt = Gt;
    fn pairing(p: &Self::G1Affine, q: &Self::G2Affine) -> Self::Gt {
    pairing(p, q)
    }
    }

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

No branches or pull requests

2 participants