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.

30 lines
564 B

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