Skip to content

Subgroup membership test for curves which cofactor =/= 1 #16

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

Open
AntoineRondelet opened this issue May 26, 2020 · 3 comments
Open

Subgroup membership test for curves which cofactor =/= 1 #16

AntoineRondelet opened this issue May 26, 2020 · 3 comments
Assignees
Labels

Comments

@AntoineRondelet
Copy link
Contributor

AntoineRondelet commented May 26, 2020

For now, no "multiplication by the cofactor" is done in the BLS12_377 implementation. However, the cofactor isn't 1:

u = 0x8508c00000000001

def g1_h(x):
    return ((x-1)**2) // 3

g1_h(u)
# 30631250834960419227450344600217059328

This is obviously insecure and vulnerable to attacks such as the small subgroup attack.
Add multiplication by cofactor or subgroup membership test where relevant - i.e. in the deserialization functions etc - (same applies in G2 and for other curves with cofactor =/= 1)

@AntoineRondelet AntoineRondelet self-assigned this May 26, 2020
@AntoineRondelet AntoineRondelet changed the title Subgroup mebership test for curves which cofactor =/= 0 Subgroup membership test for curves which cofactor =/= 0 May 26, 2020
@AntoineRondelet
Copy link
Contributor Author

If I haven't missed anything, the edward curve implemented in libff doesn't seem to implement Decaf, and has a cofactor = 4. It may be worth double checking as I believe that the subgroup membership tests may have been forgotten. To double check.

@AntoineRondelet AntoineRondelet changed the title Subgroup membership test for curves which cofactor =/= 0 Subgroup membership test for curves which cofactor =/= 1 Jun 8, 2020
@AntoineRondelet
Copy link
Contributor Author

Related to: scipr-lab/libff#45

@AntoineRondelet
Copy link
Contributor Author

See also, this recent note by M. Scott: https://eprint.iacr.org/2021/1130.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant