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.

23 lines
381 B

  1. include "../../circuit/pointbits.circom";
  2. template Main() {
  3. signal input in[2];
  4. var i
  5. component p2b = Point2Bits_Strict();
  6. component b2p = Bits2Point_Strict();
  7. p2b.in[0] <== in[0];
  8. p2b.in[1] <== in[1];
  9. for (i=0; i<256; i++) {
  10. b2p.in[i] <== p2b.out[i];
  11. }
  12. b2p.out[0] === in[0];
  13. b2p.out[1] === in[1];
  14. }
  15. component main = Main();