-
Notifications
You must be signed in to change notification settings - Fork 27
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
Define hashing to scalar #301
Comments
I think 'hash_to_field' should work for this.
|
Sorry, my comment was going to be: not sure how different hash_to_scalar is from hash_to_field, as it seems like the last one is used for hashing to scalars. |
Indeed, you're right, I totally missed that paragraph. Thank you for spotting it! I wasn't thinking of anything different between the two: HashToScalar() would simply be an API naming convenience. So there would be HashToCurve() for points, and HashToScalar() for scalars, instead of HashToField(). But maybe this is totally irrelevant and not in the scope of the document. |
We used hashToField because this is a generic function that can be instantiated in, for example, hashToScalar. However, other applications can also use hashToField for their own purposes. |
Yup, clear :) thank you both! |
See caveat #343 (comment): hash_to_scalar produces 0..p-1 while scalars usually must be 1..p-1 |
Just like hash_to_curve, maybe a function for hashing to a scalar (e.g. "hash_to_scalar") could be defined, that would be an alias of hash_to_field.
https://github.com/armfazh/h2c-go-ref implements such a functions
The text was updated successfully, but these errors were encountered: