Since Poseidon Hash is used because of compatibility in zkSNARK circuits, due
circuit constraints number, the hash method of [T]*big.Int is the one directly
compatible with the circuits, is the method which have the `Hash` name on it.
The method that can take arbitrary length of []*big.Int putting them in chunks
of [T]*big.Int and iterating, is called `HashSlice`. The `HashBytes` has been
removed, as is a method that will not be used in zkSNARK circuits due high
constraints number.
For zkSNARK circuits, should be used `poseidon.Hash([poseidon.T]*big.Int)`.
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
```
Optimize Poseidon migrating from *big.Int to goff generated finite field
operations.
Benchmarks:
Tested on a Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, with 16GB of RAM.
- Before the optimizations:
```
BenchmarkPoseidon-4 470 2489678 ns/op
BenchmarkPoseidonLarge-4 476 2530568 ns/op
```
- With the optimizations of #12:
```
BenchmarkPoseidon-4 766 1550013 ns/op
BenchmarkPoseidonLarge-4 782 1547572 ns/op
```
- With the changes of this PR, where uses goff generated code instead of *big.Int:
```
BenchmarkPoseidon-4 9638 121651 ns/op
BenchmarkPoseidonLarge-4 9781 119921 ns/op
```