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.

32 lines
504 B

  1. include "../../circuits/pedersen.circom";
  2. include "../../circuits/bitify.circom";
  3. template Main() {
  4. signal input in;
  5. signal output out[2];
  6. component pedersen = Pedersen(256);
  7. component n2b;
  8. n2b = Num2Bits(253);
  9. var i;
  10. in ==> n2b.in;
  11. for (i=0; i<253; i++) {
  12. pedersen.in[i] <== n2b.out[i];
  13. }
  14. for (i=253; i<256; i++) {
  15. pedersen.in[i] <== 0;
  16. }
  17. pedersen.out[0] ==> out[0];
  18. pedersen.out[1] ==> out[1];
  19. }
  20. component main = Main();