Oleksandr Brezhniev
e5cf066b8b
Poseidon Sponge Hash with different frame sizes ( #52 )
* Poseidon Sponge Hash with different frame sizes
* Update deps. Bump go version
* Update & fix linter.
* Refactor a bit.
* Reduce gc pressure
1 year ago
Oleksandr Brezhniev
64e757cc4a
Better keccac256 ( #41 )
* Switch to keccac256 implementation from golang.org/x/crypto instead of go-ethereum
3 years ago
arnaucube
6d75396b4b
Upgrade linters
4 years ago
arnaucube
3a9171000b
Poseidon & MiMC7 HashBytes remove return of err
4 years ago
Eduard S
0ac8b46493
Fix linters errors
4 years ago
arnaucube
4750e9c83c
Remove field package which is no longer used
4 years ago
arnaucube
16a8a18a6d
Optimize MiMC7 migrating from *big.Int to goff
Optimize MiMC7 migrating from *big.Int to goff generated finite field
operations.
There is still a lot of room for optimization for MiMC7 in the way that is done internally, but will be done in the future.
Benchmarks:
Tested on a Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, with 16GB of RAM.
- Before:
```
BenchmarkMIMC7-4 1026 1160298 ns/op
```
- After this commit:
```
BenchmarkMIMC7-4 19263 61651 ns/op
```
4 years ago
Eduard S
a5b6afcb16
Add poseidon and babyjub benchmarks
5 years ago
arnaucube
c95c95b7b1
add Poseidon multihash ([]*big.Int), add HashBytes for MiMC7 & Poseidon
5 years ago
arnaucube
2b1935299c
MiMC7 finite field over R comprovation moved inside hash, same approach as Poseidon impl
5 years ago
arnaucube
c4b3b7a09c
update babyjub B8, clean unused funcs & errs in mimc7, small update in mimc7 tests
5 years ago
arnaucube
7b219e15ec
add travis, add go.mod go.sum, update babyjub hex encoders to avoid
importing go-iden3
5 years ago
arnaucube
e92a15d3b0
add mimc7 & fields
5 years ago