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

feat: add Grumpkin elliptic curve (native 2-cycle with BN254) #1409

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

yelhousni
Copy link
Contributor

@yelhousni yelhousni commented Feb 4, 2025

Description

This PR implements arithmetic over the Grumpkin elliptic curve as native operations in a BN254 SNARK. This is similar to sw_bls12377 and sw_bls24315 packages, except there is no (efficient) pairing on Grumpkin. This needs Consensys/gnark-crypto#625 to be merged first.

Grumpkin forms a 2-cycle with BN254 and the combination is useful for many protocols.

TODO:

  • implement endomorphism-based optimizations.

Type of change

  • New feature (non-breaking change which adds functionality)

How has this been tested?

Arithmetic tests against gnark-crypto are implemented + edge cases.

How has this been benchmarked?

r1cs scs
scalar mul 1,724 4,899
joint scalar mul 3,100 8,500

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@yelhousni yelhousni self-assigned this Feb 4, 2025
@yelhousni yelhousni added this to the v0.11.N milestone Feb 4, 2025
@yelhousni yelhousni requested a review from ivokub February 4, 2025 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant