You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described in the title of its [specifications paper](https://www.techrxiv.org/articles/preprint/CIRCOM_A_Robust_and_Scalable_Language_for_Building_Complex_Zero-Knowledge_Circuits/19374986/1), CIRCOM is a **language for building complex zero-knowledge circuits**.
54
54
@@ -62,7 +62,7 @@ In this regard, CIRCOM users can use templates to create their own custom circui
62
62
63
63
However, CIRCOM users can also use templates from [CIRCOMLIB](https://github.com/iden3/circomlib), which is a publicly available library that contains hundreds of circuits such as; comparators, hash functions, digital signatures, binary and decimal converters.
64
64
65
-
### Circuit Compiler
65
+
### Circuit compiler
66
66
67
67
In addition to being a DSL used to define and create Arithmetic circuits, CIRCOM has a special compiler of Arithmetic circuits into their equivalent R1CS.
68
68
@@ -87,7 +87,7 @@ $$
87
87
\texttt{a} \times \texttt{b} \texttt{ - c = 0}
88
88
$$
89
89
90
-
### The `pragma`Instruction
90
+
### The `pragma`instruction
91
91
92
92
The `pragma` instruction specifies the version of the CIRCOM compiler being used. It is meant to ensure compatibility between the circuit and the compiler version. If the two are incompatible, the compiler throws a warning.
93
93
@@ -97,7 +97,7 @@ pragma circom 2.0.0;
97
97
98
98
As a precautionary measure, all files with the `.circom` extension should start with a `pragma` instruction. In the absence of this instruction, it is assumed that the code is compatible with the latest compiler version.
99
99
100
-
### Declaration Of Signals
100
+
### Declaration of signals
101
101
102
102
In the Multiplier example, there are two input signals $\texttt{a}$ and $\texttt{b}$, and an output signal $\texttt{c}$.
103
103
@@ -111,7 +111,7 @@ signal input b;
111
111
signal output c;
112
112
```
113
113
114
-
### The <== Operator
114
+
### The <== operator
115
115
116
116
The functionality of this operator is twofold;
117
117
@@ -122,7 +122,7 @@ The functionality of this operator is twofold;
122
122
c <== a * b;
123
123
```
124
124
125
-
### Creation Of Templates
125
+
### Creation of templates
126
126
127
127
One of the main peculiarities of CIRCOM is the allowance to define parameterizable small circuits called **templates**.
128
128
@@ -145,7 +145,7 @@ template Multiplier () {
145
145
}
146
146
```
147
147
148
-
### Instantiation Of Templates
148
+
### Instantiation of templates
149
149
150
150
Although the above code succeeds in creating the `Multiplier template`, the template is yet to be instantiated.
151
151
@@ -163,7 +163,7 @@ Declaration of components is the means by which CIRCOM enables programmers to wo
163
163
164
164
Small circuits can be defined which can be combined to create larger circuits by the complexity of the computations needed to be carried out.
165
165
166
-
### Compiling a Circuit
166
+
### Compiling a circuit
167
167
168
168
As previously mentioned, the use of the operator "<==" in the `Multiplier template` has dual functionality:
169
169
@@ -193,7 +193,7 @@ Whichever program is used, needs as input, a file containing a set of valid inpu
193
193
194
194
Recall that **a valid set of circuit input, intermediate and output values is called the witness**.
195
195
196
-
### Private And Public Signals
196
+
### Private and public signals
197
197
198
198
Depending on the `template` being used, some signals are `private` while others are `public`.
199
199
@@ -205,7 +205,7 @@ component main {public [a]} = Multiplier();
205
205
206
206
According to the above line, the input signal $\texttt{a}$ is `public`, while $\texttt{b}$ is `private` by default.
207
207
208
-
### Main Component
208
+
### Main component
209
209
210
210
The CIRCOM compiler needs a specific component as an entry point. And this initial component is called `main`.
211
211
@@ -229,7 +229,7 @@ However, the `main` component has a special attribute to set a list of global in
229
229
230
230
The rule of thumb is: **Any other input signal not included in this list `{public [s1,..,sn]}`, is considered private**.
231
231
232
-
### Concluding CIRCOM's Features
232
+
### Concluding CIRCOM's features
233
233
234
234
There are many more features that distinguish CIRCOM from other known ZK tools. The rest of these features delineated in the original [CIRCOM paper](https://www.techrxiv.org/articles/preprint/CIRCOM_A_Robust_and_Scalable_Language_for_Building_Complex_Zero-Knowledge_Circuits/19374986/1).
0 commit comments