iden3 / go-iden3-crypto

Go implementation of some cryptographic primitives (that fit inside the SNARK field) and compatible with circomlib
Apache License 2.0
117 stars 38 forks source link

implemented optimized poseidon #38

Closed Mikelle closed 2 years ago

arnaucube commented 2 years ago

@arnaubennassar : Just a comment: I understand that the new and the old Poseidon have the same tests. I don't know if there is a pattern in Go that allow to easily reuse the same tests for two different packages, but that would be neat

Maybe something like what is done in the db package of the go-merkletree, about having the tests in a separated sub package test, and call them from the actual different packages, so the test code just need to exist at one place: https://github.com/iden3/go-merkletree/tree/master/db