Merge branch 'master' of github.com:iden3/circom
Jordi Baylina jordi@baylina.cat
Wed, 28 Nov 2018 10:27:17 +0100
1 files changed,
6 insertions(+),
6 deletions(-)
jump to
M
README.md
→
README.md
@@ -1,6 +1,6 @@
# Circom -Circon is a language designed to write arithmetic circuits that can be used in zero knowledge proofs. +Circom is a language designed to write arithmetic circuits that can be used in zero knowledge proofs. In particular, it is designed to work in [zksnarks JavaScript library](https://github.com/iden3/zksnark).@@ -25,7 +25,7 @@
component main = NAND(); ``` -The language uses mainly JavaScript/C syntax together with 5 extra operators to define the constraints: +The language uses mainly JavaScript/C syntax together with 5 extra operators to define the following constraints: `<==` , `==>` : These two operators are used to connect signals and at the same time imply a constraint.@@ -39,7 +39,7 @@ In the above example, both inputs are forced to be binary by adding the constraints `a*(a-1)===0` and `b*(b-1) === 0`.
### Compilation the circuit -First of all, the compiler must be installed typing: +First of all, the compiler must be installed by typing: ``` npm install -g circom@@ -48,7 +48,7 @@
The circuit is compiled with the following command: ``` -circom -s mycircuit.circom -o mycircuit.json +circom mycircuit.circom -o mycircuit.json ``` The resulting output ( `mycircuit.json` ) can be used in the [zksnarks JavaScript library](https://github.com/iden3/zksnark).@@ -91,7 +91,7 @@ in === out[0]*2**0 + out[1]*2**1 + out[2]*2**2 + ... + out[n-1]*2**(n-1)
``` We do this by using a variable `lc1` and adding each signal multiplied by its coefficient. -This variable does not hold a value in compilation time, but it holds a linear combination and it is used in the last constraint: +This variable does not hold a value at compilation time, but it holds a linear combination and it is used in the last constraint: ``` lc1 === in;@@ -256,7 +256,7 @@
## License -Circon is part of the iden3 project copyright 2018 0KIMS association and published with GPL-3 license. Please check the COPYING file for more details. +Circom is part of the iden3 project copyright 2018 0KIMS association and published with GPL-3 license. Please check the COPYING file for more details.