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

Fix is_Z1_pubkey #107

Merged
merged 3 commits into from
Nov 16, 2020
Merged

Fix is_Z1_pubkey #107

merged 3 commits into from
Nov 16, 2020

Conversation

hwwhww
Copy link
Contributor

@hwwhww hwwhww commented Nov 15, 2020

What was wrong?

Thanks to Nguyen Thoi Minh Quan for the bug report. Somehow the serialization is not unique (see #108), the infinity point checks should have been done after decompression.

How was it fixed?

  • Extract pubkey_subgroup_check from pubkey_to_G1.
  • Test if is_inf(pubkey_point) after pubkey_to_G1.
  • Apply full KeyValidate(pk) in the precondition of FastAggregateVerify.

Cute Animal Picture

🦝

Copy link
Collaborator

@CarlBeek CarlBeek left a comment

Choose a reason for hiding this comment

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

Good catch Nguyen Thoi Minh Quan.

py_ecc/bls/ciphersuites.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ChihChengLiang ChihChengLiang left a comment

Choose a reason for hiding this comment

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

Added some nitpicks

py_ecc/bls/g2_primitives.py Outdated Show resolved Hide resolved
tests/bls/ciphersuites/test_g2_basic.py Outdated Show resolved Hide resolved
tests/bls/ciphersuites/test_g2_basic.py Outdated Show resolved Hide resolved
tests/bls/ciphersuites/test_g2_basic.py Show resolved Hide resolved
py_ecc/bls/g2_primitives.py Outdated Show resolved Hide resolved
hwwhww and others added 2 commits November 16, 2020 20:33
Co-authored-by: Carl Beekhuizen <carl@ethereum.org>
Co-authored-by: Chih Cheng Liang <chihchengliang@gmail.com>
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.

3 participants