grapevine-sonobe/circom/node_modules/circomlib/test/circuits/pedersen_test.circom
circom/node_modules/circomlib/test/circuits/pedersen_test.circomRaw
1pragma circom 2.0.0;
2
3include "../../circuits/pedersen_old.circom";
4include "../../circuits/bitify.circom";
5
6
7template Main() {
8 signal input in[2];
9 signal output out[2];
10
11 component pedersen = Pedersen(250*2);
12
13 component n2b[2];
14 n2b[0] = Num2Bits(250);
15 n2b[1] = Num2Bits(250);
16
17 var i;
18
19 in[0] ==> n2b[0].in;
20 in[1] ==> n2b[1].in;
21
22 for (i=0; i<250; i++) {
23 n2b[0].out[i] ==> pedersen.in[i];
24 n2b[1].out[i] ==> pedersen.in[250+i];
25 }
26
27 pedersen.out[0] ==> out[0];
28 pedersen.out[1] ==> out[1];
29}
30
31component main = Main();