gnark-crypto
gnark-crypto copied to clipboard
Feat/poseidon2
Description
Implementation of poseidon2 for t=2,3 following reference implementation reference paper TBD: algos 1, 2, 3 of https://tosc.iacr.org/index.php/ToSC/article/view/8913/8489 for finding internal matrices when t>3
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How has this been benchmarked?
Please describe the benchmarks that you ran to verify your changes.
- [x] Benchmark A, on Macbook pro M1, 32GB RAM
goarch: amd64 pkg: github.com/consensys/gnark-crypto/ecc/bn254/fr/poseidon2 cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz BenchmarkPoseidon2-12 163784 7035 ns/op
Checklist:
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] I did not modify files generated from templates
- [x]
golangci-lint
does not output errors locally - [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules