-
Notifications
You must be signed in to change notification settings - Fork 190
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
Implementing Keccak256 #227
Comments
Hi @Bisht13! Your constraint evaluation is failing, because your "or" method isn't algebraic. Similarly, expressions like an if/else assignment Hope this helps! |
Thanks! @Nashtare, I resolved the issue by adding an upper bound in constraints. Also, can you please provide links for the same as I was unable to find them. |
You can look at Polygon Zero's zkEVM implementation, for an example of a Keccak STARK: |
Is there a way I can get the verifier as a solidity file? I want to verify the proof on chain. |
I want to implement keccak256 as I want to create a zk proof of "I know the preimage of the keccak256 hash".
I'm unable to implement bit operations. I'm converting current_state (type
E: Field Element
) to bytes and then doing the bit operation and then converting it back to type E (usingE::from()
). But this seems to break the code as the proof is not verifying. Currently, I'm trying a very small trace of length 8 with elements (2,4,6,8,10,12,14,16
) and my transition constraint is (result[0] = next_state - OR(current_state, E::ONE) - E::ONE
). But the proof is not verifying. Can you help me to figure out where did I go wrong? @irakliykThe text was updated successfully, but these errors were encountered: