You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
482 B

  1. pragma circom 2.0.0;
  2. include "node_modules/keccak256-circom/circuits/keccak.circom";
  3. template KeccakChain () {
  4. signal input ivc_input[32*8];
  5. signal output ivc_output[32*8];
  6. component keccak = Keccak(32*8, 32*8);
  7. for (var i=0; i<32*8; i++) {
  8. keccak.in[i] <== ivc_input[i];
  9. }
  10. for (var i=0; i<32*8; i++) {
  11. ivc_output[i] <== keccak.out[i];
  12. }
  13. }
  14. // for a input & output of 32 bytes:
  15. component main { public [ivc_input] } = KeccakChain();