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

fix: add G2 subgroup check for ECPAIRING #268

Merged
merged 10 commits into from
Jun 10, 2024
Merged

Conversation

Nashtare
Copy link
Collaborator

@Nashtare Nashtare commented Jun 7, 2024

  • Naive implementation of G2 subgroup check via scalar mul. by the prime order: ~70k cycles per input (~11% overhead per pairing)
  • Optimized implementation via https://eprint.iacr.org/2022/348: ~18k cycles per input (~3% overhead per pairing)

All 144 ecpairing_inputs tests mentioned in #263 pass.

TODO:

  • Reduce overhead by implementing faster subgroup membership check
  • Add unit tests

closes #263

@Nashtare Nashtare added this to the Type 1 - Q2 2024 milestone Jun 7, 2024
@Nashtare Nashtare self-assigned this Jun 7, 2024
@github-actions github-actions bot added the crate: evm_arithmetization Anything related to the evm_arithmetization crate. label Jun 7, 2024
@Nashtare Nashtare changed the title fix: add G2 subgroup check for ECPAIRING (WIP) fix: add G2 subgroup check for ECPAIRING Jun 7, 2024
@Nashtare Nashtare marked this pull request as ready for review June 7, 2024 17:48
@Nashtare Nashtare mentioned this pull request Jun 7, 2024
3 tasks
Copy link
Contributor

@wborgeaud wborgeaud left a comment

Choose a reason for hiding this comment

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

LGTM

@Nashtare Nashtare merged commit 428ac1b into develop Jun 10, 2024
6 checks passed
@Nashtare Nashtare deleted the fix/pairing_check branch June 10, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: evm_arithmetization Anything related to the evm_arithmetization crate.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Failed proof generation for ECPAIRING on invalid inputs
2 participants