Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MiMC on BLS12-377's scalar field #132

Merged

Conversation

AlexandreBelling
Copy link
Contributor

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:

  • 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.

Signed-off-by: AlexandreBelling <alexandrebelling8@gmail.com>
@AlexandreBelling AlexandreBelling force-pushed the gnark/add-support-for-bls12377 branch from 90af9c9 to 359534c Compare January 3, 2024 23:28
Copy link
Contributor

@garyschulte garyschulte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

Copy link
Contributor

@matkt matkt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matkt matkt merged commit a674a55 into hyperledger:main Jan 4, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants