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.

28 lines
561 B

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