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(bls12-381): pairing using direct Fp12 + non-native Eval() #1349

Merged
merged 3 commits into from
Dec 14, 2024

Conversation

yelhousni
Copy link
Contributor

Description

Similar to #1312 and #1339 but for BLS12-381.

Type of change

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

How has this been tested?

  • New tests corresponding to new methods.
  • PairingCheck and FinalExpCheck tests against gnark-crypto.

How has this been benchmarked?

size-2 pairing check circuit, i.e. e(a,b)e(c,d)==1, in a BN254-PLONK:

  • old: 4,586,709 scs
  • new: 2,686,878 scs
    - diff: 1,899,831 scs

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 requested a review from ivokub December 13, 2024 19:47
@yelhousni yelhousni self-assigned this Dec 13, 2024
@yelhousni yelhousni added consolidate strengthen an existing feature perf labels Dec 13, 2024
@yelhousni yelhousni changed the title feat(bls12-381): pairing using direct Fp12 + non-native `Eval() feat(bls12-381): pairing using direct Fp12 + non-native Eval() Dec 13, 2024
Copy link
Collaborator

@ivokub ivokub left a comment

Choose a reason for hiding this comment

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

Looks perfect! Only a small comment about a duplicate code and potential refactor, but I think we can keep the refactor in a separate PR. And imo it is only small thing, dunno if it is worth it.

std/algebra/emulated/fields_bls12381/e12_pairing.go Outdated Show resolved Hide resolved
std/algebra/emulated/fields_bls12381/e12_pairing.go Outdated Show resolved Hide resolved
@yelhousni yelhousni merged commit 148d5ec into master Dec 14, 2024
5 checks passed
@yelhousni yelhousni deleted the perf/bls12381-eval-pair branch December 14, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consolidate strengthen an existing feature perf
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants