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

Potential G2 subgroup check optimization using NAF representation #237

Open
IAvecilla opened this issue Apr 12, 2024 · 0 comments · May be fixed by #266
Open

Potential G2 subgroup check optimization using NAF representation #237

IAvecilla opened this issue Apr 12, 2024 · 0 comments · May be fixed by #266

Comments

@IAvecilla
Copy link
Contributor

Context: EcPairing.yul#L458

Description:

The G2 subgroup check is implemented as point multiplication by a constant scalar (originally the G2 order, later optimized in #2). The constant can be converted to non-adjacent form (NAF) to further optimize this multiplication. Similar technique is already used in the millerLoop().

Recommendation:

zkSync:

Spearbit:

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 a pull request may close this issue.

1 participant