Skip to content

crypto/bn256: add documentation on subgroup checks for G2 #32066

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

Merged
merged 3 commits into from
Jun 20, 2025

Conversation

asanso
Copy link
Contributor

@asanso asanso commented Jun 20, 2025

This PR improves the IsOnCurve method for BN254 G2 points by:

  • Clarifying its behavior in the docstring, making it explicit that it verifies both the point being on the curve and in the correct subgroup.

  • Adding an in-line comment explaining the subgroup membership check (c.Mul(Order)).

  • Minor wording adjustments for readability and consistency.

@asanso asanso requested review from gballet, jwasinger and fjl as code owners June 20, 2025 09:02
@fjl fjl changed the title Add Subgroup Check and Clarify IsOnCurve Documentation for G2 Point crypto/bn256: add documentation on subgroup checks for G2 Jun 20, 2025
@fjl fjl merged commit f26b565 into ethereum:master Jun 20, 2025
3 checks passed
@fjl fjl added this to the 1.15.12 milestone Jun 20, 2025
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.

2 participants