snarkjs/test/circuit/circuit.circom

17 lines
280 B
Plaintext
Raw Normal View History

2020-03-28 19:40:30 +01:00
template Multiplier(n) {
signal private input a;
signal private input b;
signal output c;
2020-07-11 10:31:52 +02:00
2020-03-28 19:40:30 +01:00
signal int[n];
int[0] <== a*a + b;
for (var i=1; i<n; i++) {
int[i] <== int[i-1]*int[i-1] + b;
}
c <== int[n-1];
}
2020-07-11 10:31:52 +02:00
component main = Multiplier(1000);