Skip to content

feat: field.Hash#271

Merged
Tabaie merged 5 commits intodevelopfrom
refactor/hash2fp-for-all
Nov 21, 2022
Merged

feat: field.Hash#271
Tabaie merged 5 commits intodevelopfrom
refactor/hash2fp-for-all

Conversation

@Tabaie
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants