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

Updates on subgroup check #1952

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

Conversation

ChihChengLiang
Copy link
Contributor

@ChihChengLiang ChihChengLiang commented Aug 20, 2020

What was wrong?

Come across the pairing precompile and find these 2 issues.

  1. TODO error message on pairing.
  2. Observed that the p1 subgroup check is missing.

I'm actually uncertain about the second issue and just keeping the diff there for better discussion.
I'm seeing conflict signs of whether to do that check.

  • The fixture tests have no case for the invalid p1 that's not in a subgroup.
  • Go-ethereum checks the p1 in subgroup (sorry that's BLS, not bn)

How was it fixed?

  1. Fix the wording of the error message.
  2. Add a subgroup check for the p1.

Cute Animal Picture

image

@ChihChengLiang
Copy link
Contributor Author

Sorry, I checked the go-Ethereum again they don't check subgroup in bn256. https://github.com/ethereum/go-ethereum/blob/9efc1a847e53b63847f6f95e0857b1a6300786eb/crypto/bn256/cloudflare/bn256.go#L298

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.

None yet

1 participant