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.

17 lines
347 B

  1. template H(x) {
  2. signal output out[32];
  3. var c[8] = [0x6a09e667,
  4. 0xbb67ae85,
  5. 0x3c6ef372,
  6. 0xa54ff53a,
  7. 0x510e527f,
  8. 0x9b05688c,
  9. 0x1f83d9ab,
  10. 0x5be0cd19];
  11. for (var i=0; i<32; i++) {
  12. out[i] <== (c[x] >> i) & 1;
  13. }
  14. }
  15. component main = H(1);