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.

25 lines
405 B

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