grapevine-sonobe/circom/node_modules/circomlib/test/circuits/pointbits_loopback.circom
circom/node_modules/circomlib/test/circuits/pointbits_loopback.circomRaw
1pragma circom 2.0.0;
2
3include "../../circuits/pointbits.circom";
4
5
6template Main() {
7 signal input in[2];
8
9 var i;
10
11 component p2b = Point2Bits_Strict();
12 component b2p = Bits2Point_Strict();
13
14 p2b.in[0] <== in[0];
15 p2b.in[1] <== in[1];
16
17 for (i=0; i<256; i++) {
18 b2p.in[i] <== p2b.out[i];
19 }
20
21 b2p.out[0] === in[0];
22 b2p.out[1] === in[1];
23}
24
25component main = Main();