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.

26 lines
595 B

6 years ago
  1. include "sum.jaz"
  2. include "sigma.jaz"
  3. template SigmaPlus() {
  4. signal input in2[32];
  5. signal input in7[32];
  6. signal input in15[32];
  7. signal input in16[32];
  8. signal output out[32];
  9. component sum = Sum(32, 4);
  10. component sigma1 = Sigma(17,19,10);
  11. component sigma0 = Sigma(7, 18, 3);
  12. for (var k=0; k<32; k++) {
  13. sigma1.in[k] <== in2[k];
  14. sigma0.in[k] <== in15[k];
  15. sum.in[0][k] <== sigma1.out[k];
  16. sum.in[1][k] <== in7[k];
  17. sum.in[2][k] <== sigma0.out[k];
  18. sum.in[3][k] <== in16[k];
  19. out[k] <== sum.out[k];
  20. }
  21. }