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.

29 lines
634 B

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