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.

31 lines
667 B

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