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

G2 subgroup check is mandatory #252

Closed
IAvecilla opened this issue Apr 12, 2024 · 1 comment
Closed

G2 subgroup check is mandatory #252

IAvecilla opened this issue Apr 12, 2024 · 1 comment
Assignees

Comments

@IAvecilla
Copy link
Contributor

Context: EcPairing.yul#L1634

Description:

The G2 point inputs to the precompile must be checked if on the curve E(F_p^2) but also if in the G2 subgroup.

This is required by the specification of the EIP-197 and implemented in common EVMs (geth, revm, evmone, besu).

The ecpairing_fuzz_invalid_g2_subgroup test from lambdaclass/zksync_era_precompiles#234 should fail in case the subgroup check is missing in the implementation.

Recommendation:

Keep the G2 subgroup check in the implementation.

zkSync:

Spearbit:

@jrchatruc jrchatruc self-assigned this Apr 19, 2024
@IAvecilla
Copy link
Contributor Author

We merged #234 that contained the new tests, now we can asure that several tests will fail if subgroup check is removed.

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

No branches or pull requests

2 participants