succinctlabs / succinctx

The schelling point for ZK applications.
Apache License 2.0
134 stars 71 forks source link

Implement optimized constraints for `keccak256` #114

Open puma314 opened 1 year ago

puma314 commented 1 year ago

We currently have an implementation of keccack256 that needs implementation of optimized constraints: https://github.com/succinctlabs/succinctx/blob/main/plonky2x/src/frontend/hash/keccak/mod.rs#L13.

The implementation should be quite similar to this implementation of sha256: https://github.com/succinctlabs/succinctx/blob/main/plonky2x/src/frontend/hash/sha/sha256.rs.

nullity00 commented 1 year ago

I would like to take up this issue. And, I have a few questions :

  1. I found two implementations of keccak256, one in circom by Vocdoni & another in plonky2 by JumpCrypto. Which one would you recommend following ? Or do you recommend referring any other implementations ?
  2. Found this task implemented here. Are there any hidden caveats that I should be aware of if I am going to take this up ?
puma314 commented 1 year ago

We have 2 closed PRs that made some progress on this: