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

Feature/safer stack usage bn254 #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

garyschulte
Copy link
Owner

second round greptile bot

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This pull request enhances the safety and correctness of EIP-196 operations for the BN254 curve in the besu-native repository. Key changes include:

  • Implemented subgroup checks instead of curve checks for G1 and G2 points in gnark-eip-196.go
  • Updated error handling to provide more specific error messages for invalid inputs
  • Modified G1 point addition and scalar multiplication to use pointer receivers for improved efficiency
  • Added a new safeUnmarshalG2EIP196 function for G2 point unmarshalling with additional safety checks
  • Updated the Java test file to reflect the new error message for invalid points outside the subgroup

These changes significantly improve the security and robustness of the BN254 curve operations, particularly in handling edge cases and invalid inputs.

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant