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 keccak sponge #1096

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add keccak sponge #1096

wants to merge 2 commits into from

Conversation

mrmr1993
Copy link
Member

This PR implements the FrSponge and FqSponge traits using a sponge backed by keccak256.

This sponge is explicitly designed to provide support for verification on the EVM, and so it builds a sponge out of the keccak256 hash function instead of using the keccak sponge directly.

This PR builds upon #1095, adding a test which exercises the BN128 pairing backend and the keccak sponge.

Copy link
Member

@querolita querolita left a comment

Choose a reason for hiding this comment

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

Very nice! Nonetheless, I wonder if all parameters of this version of Keccak are the same ones as those we have been using for the gadgets. Would you mind checking this if it is not too time consuming?

For example, on input the hexadecimal value 0x4920616d20746865206f776e6572206f6620746865204e465420776974682069642058206f6e2074686520457468657265756d20636861696e does it return 0x63858e0487687c3eeb30796a3e9307680e1b81b860b01c88ff74545c2c314e36 ?

I am wondering whether it takes 64-bit or 32-bit words, if it is big or little endian, etc.

@github-actions
Copy link

Stale pull request message

@github-actions github-actions bot closed this Sep 4, 2023
@mrmr1993 mrmr1993 reopened this Sep 28, 2023
@mrmr1993 mrmr1993 changed the base branch from feature/kzg-commitment to develop September 28, 2023 10:02
@mrmr1993 mrmr1993 changed the base branch from develop to master November 28, 2023 16:21
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.

None yet

2 participants