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: avoid malicious hint in BN254 final exp check #1214

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

yelhousni
Copy link
Contributor

Description

Fixes #1213

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

Same tests.

How has this been benchmarked?

no change.

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 Jul 19, 2024
@yelhousni yelhousni added bug Something isn't working zk-evm labels Jul 19, 2024
@yelhousni yelhousni requested a review from ivokub July 19, 2024 10:56
@yelhousni yelhousni added the P1: High Issue priority: high label Jul 19, 2024
@yelhousni yelhousni added this to the v0.9.0 milestone Jul 19, 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.

LGTM

@yelhousni yelhousni requested a review from ivokub July 19, 2024 11:12
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.

I think it is sufficient that the hint returns error when previous Miller Loop result is zero. Imo it cannot really happen in any valid cases and would probably mean that the input wasn't previous Miller loop result or the accumulator was not correctly initialized.

@yelhousni yelhousni merged commit 02ff590 into master Jul 19, 2024
7 checks passed
@yelhousni yelhousni deleted the fix/BN254-finalExp branch July 19, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1: High Issue priority: high zk-evm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: malicious hint in BN254 final exp check
2 participants