Closed arnaucube closed 4 years ago
The code looks good to me! Now the only remaining thing to merge this is resolve any doubt about licensing.
So I think Apache 2 would cause any problem in either the GPLv3 licensed distribution of our libraries nor a possible commercial distribution under a private license (as long as the two requirements of the Apache 2 for Goff are met).
After internal confirmation that there are no issues with the license, will merge this PR to master.
Optimize Poseidon migrating from
*big.Int
togoff
generated finite field operations.Also fixes #4 and updates the Mimc7 usage of the
CheckBigIntArrayInField
, and updates BabyJubJub EDDSA to the new Poseidon methods.Benchmarks: Tested on a Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, with 16GB of RAM.
Before the optimizations:
With the optimizations of https://github.com/iden3/go-iden3-crypto/pull/12:
With the changes of this PR, where uses goff generated code instead of *big.Int:
More than 10x improvement (from
1.547.572 ns/op
to119.921 ns/op
).Warning: do not merge until we check the license