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.

34 lines
526 B

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