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 optimal ate pairing variant to bw6-761 #455

Closed
wants to merge 1 commit into from

Conversation

yelhousni
Copy link
Collaborator

Description

This PR implements an optimal ate variant of the Miller loop for the BW6-761 curve. This corresponds to equation (4') in https://hackmd.io/@gnark/BW6-761-changes. This is needed for testing purposes in Consensys/gnark#846.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

Added a test for bilinearity in pairing_test.go.

How has this been benchmarked?

Benchmarks are not important for this PR as the new method is only used to test the gnark circuit implementation. However, this blog post is a good resource for benchamrks https://hackmd.io/@gnark/BW6-761-changes.

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 added this to the v0.10.0 milestone Oct 6, 2023
@yelhousni yelhousni requested a review from ivokub October 6, 2023 00:47
@yelhousni yelhousni self-assigned this Oct 6, 2023
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Summary

✅ Passed: 5903
❌ Failed: 0
🚧 Skipped: 5

🚧 Skipped

  • TestReference (github.com/consensys/gnark-crypto/ecc/bn254/fr/sis)
  • TestLimbDecomposition (github.com/consensys/gnark-crypto/ecc/bn254/fr/sis)
  • TestAppend (github.com/consensys/gnark-crypto/ecc/bn254/fr/tensor-commitment)
  • TestAppendSis (github.com/consensys/gnark-crypto/ecc/bn254/fr/tensor-commitment)
  • TestCommitmentSis (github.com/consensys/gnark-crypto/ecc/bn254/fr/tensor-commitment)

@yelhousni
Copy link
Collaborator Author

Closing this PR as it seems optimal Tate (the current gnark-crypto master Miller loop version) in-circuit yields better performance.

@yelhousni yelhousni closed this Oct 6, 2023
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