-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implements hash_to_curve
and samples generators for BLS12-377 and BW6-761
#241
Conversation
…nto feat/hash_to_curve
…nto feat/hash_to_curve
…nto feat/hash_to_curve
There is a bug in the |
…arkVM into feat/hash_to_curve
…eat/hash_to_curve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good.
I personally prefer more constant-time hashing-to-curve, since random point searching has a probability of failure (though negligible) and can sometimes be slow.
But implementing those maps, especially efficiently, is hard and burdensome. I support the Blake2xs approach.
…t/hash_to_curve
…t/hash_to_curve
Motivation
This PR implements Blake2Xs and uses it to implement
hash_to_curve
. The generators for BLS12-377 and BW6-761 are sampled and updated usingtry_hash_to_curve
.Unit tests checking the correspondence between the input message and generated point, as well as the BigInteger representation are provided.
This PR fixes #164, closing the loop on the BLS12-377 generator bug.