The current PR adds supports for the MiMC hash function, but on the BLS12-377 scalar's field (not to be confused with BLS12-381). The implementation is - as for its BN254 counterpart - imported from gnark's. The PR keeps support for the BN254's implementation which is used by Shomei as of now. The implementation
In more details:
Renames computeMiMC to computeMiMC254 to make the naming more specific. This can be reverted if deemed useful during the review as this introduces a breaking change.
Extends the LibGnark class to also provide computeMiMCBls12377
Adds test-cases on the Java side to check the hashes are consistent with what we get on go. The test-vectors used for the testing are the same as the one used for the Bn254 counterpart.
Description
The current PR adds supports for the MiMC hash function, but on the BLS12-377 scalar's field (not to be confused with BLS12-381). The implementation is - as for its BN254 counterpart - imported from gnark's. The PR keeps support for the BN254's implementation which is used by Shomei as of now. The implementation
In more details:
computeMiMC
tocomputeMiMC254
to make the naming more specific. This can be reverted if deemed useful during the review as this introduces a breaking change.computeMiMCBls12377