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.

28 lines
568 B

6 years ago
6 years ago
  1. include "binsum.circom";
  2. include "sigma.circom";
  3. include "maj.circom"
  4. template T2() {
  5. signal input a[32];
  6. signal input b[32];
  7. signal input c[32];
  8. signal output out[32];
  9. component sum = BinSum(32, 2);
  10. component bigsigma0 = BigSigma(2, 13, 22);
  11. component maj = Maj(32);
  12. for (var k=0; k<32; k++) {
  13. bigsigma0.in[k] <== a[k];
  14. maj.a[k] <== a[k];
  15. maj.b[k] <== b[k];
  16. maj.c[k] <== c[k];
  17. sum.in[0][k] <== bigsigma0.out[k];
  18. sum.in[1][k] <== maj.out[k];
  19. out[k] <== sum.out[k];
  20. }
  21. }