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

feat: field.Hash #271

Merged
merged 5 commits into from
Nov 21, 2022
Merged

feat: field.Hash #271

merged 5 commits into from
Nov 21, 2022

Conversation

Tabaie
Copy link
Contributor

@Tabaie Tabaie commented Nov 18, 2022

For FS commitments it is needed to hash to fr, so I'm moving the hashToFp code from the HashToCurve modules into every Fp package.
One concern is that the hash function uses some ExpandMsgXmd function, elsewhere in the gnark-crypto codebase. So as it stands field packages can no longer by copy-pasted into other projects without importing gnark-crypto.

@Tabaie Tabaie requested a review from gbotrel November 18, 2022 22:45
@gbotrel
Copy link
Collaborator

gbotrel commented Nov 21, 2022

looks good to me 👍
Small change: package hash_utils should be hashutils (using Google style guide as reference, but I know some linters complain all the same--> https://google.github.io/styleguide/go/decisions#package-names )

We can keep this package in internal/ for now, but in future it may be merged with other common pieces between field element pacakges 👍

@Tabaie Tabaie merged commit a82c982 into develop Nov 21, 2022
@Tabaie Tabaie deleted the refactor/hash2fp-for-all branch November 21, 2022 22:14
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

2 participants