Closed HarryR closed 5 years ago
The circomlib project uses sha3 for MiMC constants: https://github.com/iden3/circomlib/blob/master/src/mimc7.js#L17
Another library is: https://github.com/rhash/RHash/blob/master/librhash/sha3.h
Implemented in https://github.com/HarryR/ethsnarks/pull/105
The mimc_constants
functions use Keccak256 (Ethereum compatible).
SHA3 support comes from https://github.com/HarryR/SHA3IUF
Use implementation from: https://github.com/coruus/keccak-tiny
This will make any on-chain implementation moderately faster where the contract is required to derive a sequence of constants. e.g. when hashing data using MiMC.