feat: Add Poseidon-BN254 hash functions#1176
Merged
kevaundray merged 4 commits intonoir-lang:masterfrom Apr 19, 2023
Merged
Conversation
kevaundray
reviewed
Apr 19, 2023
kevaundray
reviewed
Apr 19, 2023
Contributor
|
I can attest that the values used in the |
kevaundray
approved these changes
Apr 19, 2023
TomAFrench
added a commit
that referenced
this pull request
Apr 24, 2023
* master: chore: update flake version to match current release (#1204) feat!: Switch to aztec_backend that uses upstream BB & UltraPlonk (#1114) chore(ssa refactor): Add Context structs and start ssa gen pass (#1196) chore(ssa): Replace JmpIf with BrIf (#1193) chore(noir): Release 0.4.1 (#1164) chore(ssa refactor): Add DenseMap and SparseMap types (#1184) feat: bump noir-source-resolver version (#1182) chore(deps): bump h2 from 0.3.16 to 0.3.18 (#1186) fix(nargo): restore `nargo codegen-verifier` functionality (#1185) chore: simplify setup code in `noir_integration` test (#1180) feat: Add Poseidon-BN254 hash functions (#1176)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue(s)
Resolves #1162
Description
Following up on the discussion in #1162, this PR adds the more conventional fixed-length Poseidon hash functions in the case of the BN254 field (i.e. using the permutation instances under
std::hash::poseidon::bn254::perm). These hash functions agree with those used by Circom. These are exposed asstd::hash::poseidon::bn254::hash_1,std::hash::poseidon::hash_2, ...,std::hash::poseidon::bn254::hash_16.Summary of changes
Dependency additions / changes
Test additions / changes
The
poseidonperm_x5_254test was modified to make use of the appropriate hash functions directly and thus renamed. Both Poseidon tests are still in the wrong place due to thelinear_eval is not 0.bug (see #1124).Checklist
cargo fmtwith default settings.Documentation needs
Additional context