circomlib/test/circuits/pedersen_test.circom

30 lines
558 B
Plaintext
Raw Normal View History

2018-12-06 19:32:49 +03:00
include "../../circuits/pedersen_old.circom";
include "../../circuits/bitify.circom";
2018-11-13 12:57:54 +03:00
template Main() {
signal input in[2];
signal output out[2];
component pedersen = Pedersen(250*2);
2018-11-13 12:57:54 +03:00
component n2b[2];
n2b[0] = Num2Bits(250);
n2b[1] = Num2Bits(250);
2018-11-13 12:57:54 +03:00
var i;
in[0] ==> n2b[0].in;
in[1] ==> n2b[1].in;
for (i=0; i<250; i++) {
2018-11-13 12:57:54 +03:00
n2b[0].out[i] ==> pedersen.in[i];
n2b[1].out[i] ==> pedersen.in[250+i];
2018-11-13 12:57:54 +03:00
}
pedersen.out[0] ==> out[0];
pedersen.out[1] ==> out[1];
}
component main = Main();