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

Faster G2 subgroup check for BN curve #173

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

kilic
Copy link
Collaborator

@kilic kilic commented Sep 18, 2024

Subgroup membership check in G2 is group order exponentiation. This PR makes it much more cheaper replacing with method ported from gnark-crypto

@kilic kilic force-pushed the bng2-faster-cofactor branch from e246461 to e5f2ab3 Compare September 18, 2024 20:30
Copy link
Contributor

@davidnevadoc davidnevadoc left a comment

Choose a reason for hiding this comment

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

Nice improvement!
Could we add a reference to the algorithm ? I took this from the gnark implementation:
// cf http://cacr.uwaterloo.ca/techreports/2011/cacr2011-26.pdf, 6.1
Is it right?

acc
})
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// psi sets p to ψ(q) = u o π o u⁻¹ where u:E'→E is the isomorphism from the twist to the curve E and π is the Frobenius map.

Let's add some comments so this is easier to follow.

@kilic kilic added this pull request to the merge queue Sep 30, 2024
Merged via the queue into privacy-scaling-explorations:main with commit eb9812c Sep 30, 2024
12 checks passed
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