starkshield 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +101 -0
  2. package/bin/circom +0 -0
  3. package/bin/cli.js +36 -0
  4. package/bin/index.js +13 -0
  5. package/circomlib/.vscode/launch.json +63 -0
  6. package/circomlib/README.md +18 -0
  7. package/circomlib/circuits/README.md +830 -0
  8. package/circomlib/circuits/aliascheck.circom +33 -0
  9. package/circomlib/circuits/babyjub.circom +107 -0
  10. package/circomlib/circuits/binsub.circom +74 -0
  11. package/circomlib/circuits/binsum.circom +101 -0
  12. package/circomlib/circuits/bitify.circom +106 -0
  13. package/circomlib/circuits/comparators.circom +141 -0
  14. package/circomlib/circuits/compconstant.circom +74 -0
  15. package/circomlib/circuits/eddsa.circom +139 -0
  16. package/circomlib/circuits/eddsamimc.circom +124 -0
  17. package/circomlib/circuits/eddsamimcsponge.circom +124 -0
  18. package/circomlib/circuits/eddsaposeidon.circom +123 -0
  19. package/circomlib/circuits/escalarmul.circom +166 -0
  20. package/circomlib/circuits/escalarmulany.circom +197 -0
  21. package/circomlib/circuits/escalarmulfix.circom +299 -0
  22. package/circomlib/circuits/escalarmulw4table.circom +52 -0
  23. package/circomlib/circuits/gates.circom +96 -0
  24. package/circomlib/circuits/mimc.circom +156 -0
  25. package/circomlib/circuits/mimcsponge.circom +293 -0
  26. package/circomlib/circuits/montgomery.circom +142 -0
  27. package/circomlib/circuits/multiplexer.circom +115 -0
  28. package/circomlib/circuits/mux1.circom +48 -0
  29. package/circomlib/circuits/mux2.circom +63 -0
  30. package/circomlib/circuits/mux3.circom +75 -0
  31. package/circomlib/circuits/mux4.circom +119 -0
  32. package/circomlib/circuits/pedersen.circom +257 -0
  33. package/circomlib/circuits/pedersen_old.circom +68 -0
  34. package/circomlib/circuits/pointbits.circom +164 -0
  35. package/circomlib/circuits/poseidon.circom +208 -0
  36. package/circomlib/circuits/poseidon_constants.circom +24959 -0
  37. package/circomlib/circuits/poseidon_constants_old.circom +252 -0
  38. package/circomlib/circuits/poseidon_old.circom +97 -0
  39. package/circomlib/circuits/sha256/ch.circom +47 -0
  40. package/circomlib/circuits/sha256/constants.circom +53 -0
  41. package/circomlib/circuits/sha256/main.circom +35 -0
  42. package/circomlib/circuits/sha256/maj.circom +45 -0
  43. package/circomlib/circuits/sha256/rotate.circom +28 -0
  44. package/circomlib/circuits/sha256/sha256.circom +81 -0
  45. package/circomlib/circuits/sha256/sha256_2.circom +91 -0
  46. package/circomlib/circuits/sha256/sha256compression.circom +166 -0
  47. package/circomlib/circuits/sha256/sha256compression_function.circom +112 -0
  48. package/circomlib/circuits/sha256/shift.circom +33 -0
  49. package/circomlib/circuits/sha256/sigma.circom +77 -0
  50. package/circomlib/circuits/sha256/sigmaplus.circom +50 -0
  51. package/circomlib/circuits/sha256/t1.circom +58 -0
  52. package/circomlib/circuits/sha256/t2.circom +51 -0
  53. package/circomlib/circuits/sha256/xor3.circom +45 -0
  54. package/circomlib/circuits/sign.circom +36 -0
  55. package/circomlib/circuits/smt/smthash_mimc.circom +58 -0
  56. package/circomlib/circuits/smt/smthash_poseidon.circom +57 -0
  57. package/circomlib/circuits/smt/smtlevins.circom +103 -0
  58. package/circomlib/circuits/smt/smtprocessor.circom +261 -0
  59. package/circomlib/circuits/smt/smtprocessorlevel.circom +95 -0
  60. package/circomlib/circuits/smt/smtprocessorsm.circom +165 -0
  61. package/circomlib/circuits/smt/smtverifier.circom +138 -0
  62. package/circomlib/circuits/smt/smtverifierlevel.circom +71 -0
  63. package/circomlib/circuits/smt/smtverifiersm.circom +106 -0
  64. package/circomlib/circuits/switcher.circom +42 -0
  65. package/circomlib/doc/root_transfer.monopic +0 -0
  66. package/circomlib/doc/smt_diagram_0.monopic +0 -0
  67. package/circomlib/doc/smt_diagram_1.monopic +0 -0
  68. package/circomlib/doc/smt_hash.monopic +0 -0
  69. package/circomlib/doc/smt_levins.monopic +0 -0
  70. package/circomlib/doc/smt_sm.monopic +0 -0
  71. package/circomlib/doc/smt_verifier_sm.monopic +0 -0
  72. package/circomlib/doc/voting.monopic +0 -0
  73. package/circomlib/doc/window.monopic +0 -0
  74. package/circomlib/doc/window_chain.monopic +0 -0
  75. package/circomlib/index.js +2 -0
  76. package/circomlib/package.json +33 -0
  77. package/circomlib/test/aliascheck.js +77 -0
  78. package/circomlib/test/babyjub.js +118 -0
  79. package/circomlib/test/binsub.js +52 -0
  80. package/circomlib/test/binsum.js +38 -0
  81. package/circomlib/test/circuits/aliascheck_test.circom +4 -0
  82. package/circomlib/test/circuits/babyadd_tester.circom +4 -0
  83. package/circomlib/test/circuits/babycheck_test.circom +4 -0
  84. package/circomlib/test/circuits/babypbk_test.circom +4 -0
  85. package/circomlib/test/circuits/binsub_test.circom +33 -0
  86. package/circomlib/test/circuits/constants_test.circom +20 -0
  87. package/circomlib/test/circuits/eddsa_test.circom +5 -0
  88. package/circomlib/test/circuits/eddsamimc_test.circom +5 -0
  89. package/circomlib/test/circuits/eddsaposeidon_test.circom +5 -0
  90. package/circomlib/test/circuits/edwards2montgomery.circom +5 -0
  91. package/circomlib/test/circuits/escalarmul_min_test.circom +27 -0
  92. package/circomlib/test/circuits/escalarmul_test.circom +33 -0
  93. package/circomlib/test/circuits/escalarmul_test_min.circom +28 -0
  94. package/circomlib/test/circuits/escalarmulany_test.circom +30 -0
  95. package/circomlib/test/circuits/escalarmulfix_test.circom +31 -0
  96. package/circomlib/test/circuits/escalarmulw4table.circom +20 -0
  97. package/circomlib/test/circuits/escalarmulw4table_test.circom +19 -0
  98. package/circomlib/test/circuits/escalarmulw4table_test3.circom +19 -0
  99. package/circomlib/test/circuits/greatereqthan.circom +5 -0
  100. package/circomlib/test/circuits/greaterthan.circom +5 -0
  101. package/circomlib/test/circuits/isequal.circom +5 -0
  102. package/circomlib/test/circuits/iszero.circom +5 -0
  103. package/circomlib/test/circuits/lesseqthan.circom +5 -0
  104. package/circomlib/test/circuits/lessthan.circom +5 -0
  105. package/circomlib/test/circuits/mimc_sponge_hash_test.circom +5 -0
  106. package/circomlib/test/circuits/mimc_sponge_test.circom +5 -0
  107. package/circomlib/test/circuits/mimc_test.circom +5 -0
  108. package/circomlib/test/circuits/montgomery2edwards.circom +5 -0
  109. package/circomlib/test/circuits/montgomeryadd.circom +5 -0
  110. package/circomlib/test/circuits/montgomerydouble.circom +5 -0
  111. package/circomlib/test/circuits/mux1_1.circom +33 -0
  112. package/circomlib/test/circuits/mux2_1.circom +37 -0
  113. package/circomlib/test/circuits/mux3_1.circom +41 -0
  114. package/circomlib/test/circuits/mux4_1.circom +56 -0
  115. package/circomlib/test/circuits/pedersen2_test.circom +34 -0
  116. package/circomlib/test/circuits/pedersen_test.circom +31 -0
  117. package/circomlib/test/circuits/pointbits_loopback.circom +25 -0
  118. package/circomlib/test/circuits/poseidon3_test.circom +5 -0
  119. package/circomlib/test/circuits/poseidon6_test.circom +5 -0
  120. package/circomlib/test/circuits/poseidonex_test.circom +5 -0
  121. package/circomlib/test/circuits/sha256_2_test.circom +17 -0
  122. package/circomlib/test/circuits/sha256_test448.circom +5 -0
  123. package/circomlib/test/circuits/sha256_test512.circom +5 -0
  124. package/circomlib/test/circuits/sign_test.circom +5 -0
  125. package/circomlib/test/circuits/smtprocessor10_test.circom +5 -0
  126. package/circomlib/test/circuits/smtverifier10_test.circom +5 -0
  127. package/circomlib/test/circuits/sum_test.circom +33 -0
  128. package/circomlib/test/comparators.js +187 -0
  129. package/circomlib/test/eddsa.js +75 -0
  130. package/circomlib/test/eddsamimc.js +102 -0
  131. package/circomlib/test/eddsaposeidon.js +103 -0
  132. package/circomlib/test/escalarmul.js +121 -0
  133. package/circomlib/test/escalarmulany.js +51 -0
  134. package/circomlib/test/escalarmulfix.js +95 -0
  135. package/circomlib/test/helpers/printsignal.js +22 -0
  136. package/circomlib/test/helpers/sha256.js +178 -0
  137. package/circomlib/test/mimccircuit.js +27 -0
  138. package/circomlib/test/mimcspongecircuit.js +47 -0
  139. package/circomlib/test/montgomery.js +101 -0
  140. package/circomlib/test/multiplexer.js +101 -0
  141. package/circomlib/test/pedersen.js +83 -0
  142. package/circomlib/test/pedersen2.js +56 -0
  143. package/circomlib/test/point2bits.js +30 -0
  144. package/circomlib/test/poseidoncircuit.js +80 -0
  145. package/circomlib/test/sha256.js +118 -0
  146. package/circomlib/test/sign.js +82 -0
  147. package/circomlib/test/smtprocessor.js +219 -0
  148. package/circomlib/test/smtverifier.js +141 -0
  149. package/lib/compile.js +82 -0
  150. package/lib/deploy.js +391 -0
  151. package/lib/test.js +47 -0
  152. package/lib/verify.js +153 -0
  153. package/package.json +43 -0
  154. package/pot12_0000.ptau +0 -0
  155. package/pot12_0001.ptau +0 -0
  156. package/ptau/pot12_final.ptau +0 -0
@@ -0,0 +1,830 @@
1
+ # CircomLib/Circuits
2
+
3
+ ## Description
4
+
5
+ - This folder contains circuit templates for standard operations and many cryptographic primitives.
6
+ - Below you can find specifications of each function. In the representation of elements, there are three tyes:
7
+ - Binary
8
+ - String
9
+ - Field element (the field is specified in each case. We consider 2 possible fields: Fp and Fr, where p... and r... .)
10
+
11
+ ## Table of Contents
12
+
13
+ [TOC]
14
+
15
+ ## Jordi
16
+
17
+ * compconstant - Returns 1 if `in` (expanded to binary array) > `ct`
18
+ * aliascheck - check if `in` (expanded to binary array) oveflowed its 254 bits (<= -1)
19
+ * babyjub - twisted Edwards curve 168700.x^2 + y^2 = 1 + 168696.x^2.y^2
20
+ * BabyAdd - (`xout`,`yout`) = (`x1`,`y1`) + (`x2`,`y2`)
21
+ * BabyDbl - (`xout`,`yout`) = 2*(`x`,`y`)
22
+ * BabyCheck - check that (`x`,`y`) is on the curve
23
+ * binsub - binary subtraction
24
+ * gates - logical gates
25
+ * mimc - SNARK-friendly hash Minimal Multiplicative Complexity.
26
+ * https://eprint.iacr.org/2016/492.pdf
27
+ * zcash/zcash#2233
28
+ * smt - Sparse Merkle Tree
29
+ * https://ethresear.ch/t/optimizing-sparse-merkle-trees/3751
30
+ * montgomery https://en.wikipedia.org/wiki/Montgomery_curve
31
+
32
+ ## Circuits
33
+
34
+ ### sha256
35
+
36
+ Folder containing the implementation of sha256 hash circuit.
37
+
38
+ ### smt
39
+
40
+ Folder containing the circuit implementation of Sparse Merkle Trees.
41
+
42
+ ### aliascheck
43
+
44
+ - `AliasCheck()`
45
+
46
+ - DESCRIPTION
47
+ - SCHEMA
48
+ - INPUT
49
+ - OUTPUT
50
+ - BENCHMARKS
51
+ - EXAMPLE
52
+
53
+ ### babyjub
54
+
55
+ Arithmetic on [Baby Jubjub elliptic curve](https://github.com/barryWhiteHat/baby_jubjub) in twisted Edwards form. (TODO: Expose here the characteristics of the curve?)
56
+
57
+
58
+ - `BabyAdd()`
59
+
60
+ - DESCRIPTION
61
+
62
+ It adds two points on the Baby Jubjub curve. More specifically, given two points P1 = (`x1`, `y1`) and P2 = (`x2`, `y2`) it returns a point P3 = (`xout`, `yout`) such that
63
+
64
+ (`xout`, `yout`) = (`x1`,`y1`) + (`x2`,`y2`)
65
+ = ((`x1y2`+`y1x2`)/(1+`dx1x2y1y2`)),(`y1y2`-`ax1x2`)/(1-`dx1x2y1y2`))
66
+
67
+ - SCHEMA
68
+ ```
69
+ var a var d
70
+ | |
71
+ | |
72
+ ______v_________v_______
73
+ input x1 ----> | |
74
+ input y1 ----> | BabyAdd() | ----> output xout
75
+ input x2 ----> | | ----> output yout
76
+ input y2 ----> |________________________|
77
+ ```
78
+
79
+ - INPUTS
80
+
81
+ | Input | Representation | Description | |
82
+ | ------------- | ------------- | ------------- | ------------- |
83
+ | `x1` | Bigint | Field element of Fp | First coordinate of a point (x1, y1) on E. |
84
+ | `y1` | Bigint | Field element of Fp | Second coordinate of a point (x1, y1) on E. |
85
+ | `x2` | Bigint | Field element of Fp | First coordinate of a point (x2, y2) on E. |
86
+ | `y2` | Bigint | Field element of Fp | Second coordinate of a point (x2, y2) on E. |
87
+
88
+ Requirement: at least `x1`!=`x2` or `y1`!=`y2`.
89
+
90
+ - OUTPUT
91
+
92
+ | Input | Representation | Description | |
93
+ | ------------- | ------------- | ------------- | ------------- |
94
+ | `xout` | Bigint | Field element of Fp | First coordinate of the addition point (xout, yout) = (x1, y1) + (x2, y2). |
95
+ | `yout` | Bigint | Field element of Fp | Second coordinate of the addition point (xout, yout) = (x1, y1) + (x2, y2). |
96
+
97
+ - BENCHMARKS (constraints)
98
+
99
+ - EXAMPLE
100
+
101
+ - `BabyDbl()`
102
+ - DESCRIPTION : doubles a point (`xout`,`yout`) = 2*(`x`,`y`).
103
+ - SCHEMA
104
+ - INPUT
105
+ - OUTPUT
106
+ - BENCHMARKS
107
+ - EXAMPLE
108
+
109
+ - `BabyCheck()`
110
+
111
+ - DESCRIPTION : checks if a given point is in the curve.
112
+ - SCHEMA
113
+ - INPUT
114
+ - OUTPUT
115
+ - BENCHMARKS
116
+ - EXAMPLE
117
+
118
+ - `BabyPbk()`
119
+
120
+ - DESCRIPTION: : given a private key, it returns the associated public key.
121
+ - SCHEMA
122
+ - INPUT
123
+ - OUTPUT
124
+ - BENCHMARKS
125
+ - EXAMPLE
126
+
127
+
128
+ ### binsub
129
+
130
+ - `BinSub(n)`
131
+
132
+ - DESCRIPTION: binary substraction.
133
+ - SCHEMA
134
+ - INPUT
135
+ - OUTPUT
136
+ - BENCHMARKS
137
+ - EXAMPLE
138
+
139
+ ### binsum
140
+
141
+ - `nbits(a)`
142
+
143
+ - DESCRIPTION : binary sum.
144
+ - SCHEMA
145
+ - INPUT
146
+ - OUTPUT
147
+ - BENCHMARKS
148
+ - EXAMPLE
149
+
150
+ - `BinSum(n, ops)`
151
+
152
+ - DESCRIPTION
153
+ - SCHEMA
154
+ - INPUT
155
+ - OUTPUT
156
+ - BENCHMARKS
157
+ - EXAMPLE
158
+
159
+ ### bitify
160
+
161
+ - `Num2Bits()`
162
+
163
+ - DESCRIPTION
164
+ - SCHEMA
165
+ - INPUT
166
+ - OUTPUT
167
+ - BENCHMARKS
168
+ - EXAMPLE
169
+
170
+ - `Num2Bits_strict()`
171
+
172
+ - DESCRIPTION
173
+ - SCHEMA
174
+ - INPUT
175
+ - OUTPUT
176
+ - BENCHMARKS
177
+ - EXAMPLE
178
+
179
+ - `Bits2Num()`
180
+
181
+ - DESCRIPTION
182
+ - SCHEMA
183
+ - INPUT
184
+ - OUTPUT
185
+ - BENCHMARKS
186
+ - EXAMPLE
187
+
188
+ - `Bits2Num_strict()`
189
+
190
+ - DESCRIPTION
191
+ - SCHEMA
192
+ - INPUT
193
+ - OUTPUT
194
+ - BENCHMARKS
195
+ - EXAMPLE
196
+
197
+ - `Num2BitsNeg()`
198
+
199
+ - DESCRIPTION
200
+ - SCHEMA
201
+ - INPUT
202
+ - OUTPUT
203
+ - BENCHMARKS
204
+ - EXAMPLE
205
+
206
+ ### comparators
207
+
208
+ - `IsZero() `
209
+
210
+ - DESCRIPTION
211
+ - SCHEMA
212
+ - INPUT
213
+ - OUTPUT
214
+ - BENCHMARKS
215
+ - EXAMPLE
216
+
217
+ - `IsEqual()`
218
+
219
+ - DESCRIPTION
220
+ - SCHEMA
221
+ - INPUT
222
+ - OUTPUT
223
+ - BENCHMARKS
224
+ - EXAMPLE
225
+
226
+ - `ForceEqualIfEnabled()`
227
+
228
+ - DESCRIPTION
229
+ - SCHEMA
230
+ - INPUT
231
+ - OUTPUT
232
+ - BENCHMARKS
233
+ - EXAMPLE
234
+
235
+ - `LessThan()`
236
+
237
+ - DESCRIPTION
238
+ - SCHEMA
239
+ - INPUT
240
+ - OUTPUT
241
+ - BENCHMARKS
242
+ - EXAMPLE
243
+
244
+ - `GreaterThan()`
245
+
246
+ - DESCRIPTION
247
+ - SCHEMA
248
+ - INPUT
249
+ - OUTPUT
250
+ - BENCHMARKS
251
+ - EXAMPLE
252
+
253
+ - `GreaterEqThan()`
254
+
255
+ - DESCRIPTION
256
+ - SCHEMA
257
+ - INPUT
258
+ - OUTPUT
259
+ - BENCHMARKS
260
+ - EXAMPLE
261
+
262
+ ### compconstant
263
+
264
+ - `CompConstant(ct)`
265
+
266
+ - DESCRIPTION
267
+ - SCHEMA
268
+ - INPUT
269
+ - OUTPUT
270
+ - BENCHMARKS
271
+ - EXAMPLE
272
+
273
+ ### eddsa
274
+
275
+ Edwards Digital Signature Algorithm in Baby Jubjbub (link a eddsa)
276
+
277
+ - `EdDSAVerifier(n)`
278
+
279
+ - DESCRIPTION
280
+ - SCHEMA
281
+ - INPUT
282
+ - OUTPUT
283
+ - BENCHMARKS
284
+ - EXAMPLE
285
+
286
+ ### eddsamimc
287
+
288
+ - `EdDSAMiMCVerifier()`
289
+
290
+ - DESCRIPTION
291
+ - SCHEMA
292
+ - INPUT
293
+ - OUTPUT
294
+ - BENCHMARKS
295
+ - EXAMPLE
296
+
297
+ ### eddsamimcsponge
298
+
299
+ - `EdDSAMiMCSpongeVerifier()`
300
+
301
+ - DESCRIPTION
302
+ - SCHEMA
303
+ - INPUT
304
+ - OUTPUT
305
+ - BENCHMARKS
306
+ - EXAMPLE
307
+
308
+ ### eddsaposeidon
309
+
310
+ - `EdDSAPoseidonVerifier()`
311
+
312
+ - DESCRIPTION
313
+ - SCHEMA
314
+ - INPUT
315
+ - OUTPUT
316
+ - BENCHMARKS
317
+ - EXAMPLE
318
+
319
+ ### escalarmul
320
+
321
+ - `EscalarMulWindow(base, k)`
322
+
323
+ - DESCRIPTION
324
+ - SCHEMA
325
+ - INPUT
326
+ - OUTPUT
327
+ - BENCHMARKS
328
+ - EXAMPLE
329
+
330
+ - `EscalarMul(n, base)`
331
+
332
+ - DESCRIPTION
333
+ - SCHEMA
334
+ - INPUT
335
+ - OUTPUT
336
+ - BENCHMARKS
337
+ - EXAMPLE
338
+
339
+ ### escalarmulany
340
+
341
+ - `Multiplexor2()`
342
+
343
+ - DESCRIPTION
344
+ - SCHEMA
345
+ - INPUT
346
+ - OUTPUT
347
+ - BENCHMARKS
348
+ - EXAMPLE
349
+
350
+ - `BitElementMulAny()`
351
+
352
+ - DESCRIPTION
353
+ - SCHEMA
354
+ - INPUT
355
+ - OUTPUT
356
+ - BENCHMARKS
357
+ - EXAMPLE
358
+
359
+ - `SegmentMulAny(n)`
360
+
361
+ - DESCRIPTION
362
+ - SCHEMA
363
+ - INPUT
364
+ - OUTPUT
365
+ - BENCHMARKS
366
+ - EXAMPLE
367
+
368
+ - `EscalarMulAny(n)`
369
+
370
+ - DESCRIPTION
371
+ - SCHEMA
372
+ - INPUT
373
+ - OUTPUT
374
+ - BENCHMARKS
375
+ - EXAMPLE
376
+
377
+ ### escalarmulfix
378
+
379
+ - `WindowMulFix()`
380
+
381
+ - DESCRIPTION
382
+ - SCHEMA
383
+ - INPUT
384
+ - OUTPUT
385
+ - BENCHMARKS
386
+ - EXAMPLE
387
+
388
+ - `SegmentMulFix(nWindows)`
389
+
390
+ - DESCRIPTION
391
+ - SCHEMA
392
+ - INPUT
393
+ - OUTPUT
394
+ - BENCHMARKS
395
+ - EXAMPLE
396
+
397
+ - `EscalarMulFix(n, BASE)`
398
+
399
+ - DESCRIPTION
400
+ - SCHEMA
401
+ - INPUT
402
+ - OUTPUT
403
+ - BENCHMARKS
404
+ - EXAMPLE
405
+
406
+ ### escalarmulw4table
407
+
408
+ - `pointAdd`
409
+
410
+ - DESCRIPTION
411
+ - SCHEMA
412
+ - INPUT
413
+ - OUTPUT
414
+ - BENCHMARKS
415
+ - EXAMPLE
416
+
417
+ - `EscalarMulW4Table`
418
+
419
+ - DESCRIPTION
420
+ - SCHEMA
421
+ - INPUT
422
+ - OUTPUT
423
+ - BENCHMARKS
424
+ - EXAMPLE
425
+
426
+ ### gates
427
+
428
+ - `XOR`
429
+
430
+ - DESCRIPTION
431
+ - SCHEMA
432
+ - INPUT
433
+ - OUTPUT
434
+ - BENCHMARKS
435
+ - EXAMPLE
436
+
437
+ - `AND`
438
+
439
+ - DESCRIPTION
440
+ - SCHEMA
441
+ - INPUT
442
+ - OUTPUT
443
+ - BENCHMARKS
444
+ - EXAMPLE
445
+
446
+ - `OR`
447
+
448
+ - DESCRIPTION
449
+ - SCHEMA
450
+ - INPUT
451
+ - OUTPUT
452
+ - BENCHMARKS
453
+ - EXAMPLE
454
+
455
+ - `NOT`
456
+
457
+ - DESCRIPTION
458
+ - SCHEMA
459
+ - INPUT
460
+ - OUTPUT
461
+ - BENCHMARKS
462
+ - EXAMPLE
463
+
464
+ - `NAND`
465
+
466
+ - DESCRIPTION
467
+ - SCHEMA
468
+ - INPUT
469
+ - OUTPUT
470
+ - BENCHMARKS
471
+ - EXAMPLE
472
+
473
+ - `NOR`
474
+
475
+ - DESCRIPTION
476
+ - SCHEMA
477
+ - INPUT
478
+ - OUTPUT
479
+ - BENCHMARKS
480
+ - EXAMPLE
481
+
482
+ - `MultiAND`
483
+
484
+ - DESCRIPTION
485
+ - SCHEMA
486
+ - INPUT
487
+ - OUTPUT
488
+ - BENCHMARKS
489
+ - EXAMPLE
490
+
491
+ ### mimc
492
+
493
+ Implementation of MiMC-7 hash in Fp being... (link to description of the hash)
494
+
495
+ - `MiMC7(nrounds)`
496
+
497
+ - DESCRIPTION
498
+ - SCHEMA
499
+ - INPUT
500
+ - OUTPUT
501
+ - BENCHMARKS
502
+ - EXAMPLE
503
+
504
+ - `MultiMiMC7(nInputs, nRounds)`
505
+
506
+ - DESCRIPTION
507
+ - SCHEMA
508
+ - INPUT
509
+ - OUTPUT
510
+ - BENCHMARKS
511
+ - EXAMPLE
512
+
513
+ ### mimcsponge
514
+
515
+ - `MiMCSponge(nInputs, nRounds, nOutputs)`
516
+
517
+ - DESCRIPTION
518
+ - SCHEMA
519
+ - INPUT
520
+ - OUTPUT
521
+ - BENCHMARKS
522
+ - EXAMPLE
523
+
524
+ - `MiMCFeistel(nrounds)`
525
+
526
+ - DESCRIPTION
527
+ - SCHEMA
528
+ - INPUT
529
+ - OUTPUT
530
+ - BENCHMARKS
531
+ - EXAMPLE
532
+
533
+ ### montgomery
534
+
535
+ - `Edwards2Montgomery()`
536
+
537
+ - DESCRIPTION
538
+ - SCHEMA
539
+ - INPUT
540
+ - OUTPUT
541
+ - BENCHMARKS
542
+ - EXAMPLE
543
+
544
+ - `Montgomery2Edwards()`
545
+
546
+ - DESCRIPTION
547
+ - SCHEMA
548
+ - INPUT
549
+ - OUTPUT
550
+ - BENCHMARKS
551
+ - EXAMPLE
552
+
553
+ - `MontgomeryAdd()`
554
+
555
+ - DESCRIPTION
556
+ - SCHEMA
557
+ - INPUT
558
+ - OUTPUT
559
+ - BENCHMARKS
560
+ - EXAMPLE
561
+
562
+ - `MontgomeryDouble()`
563
+
564
+ - DESCRIPTION
565
+ - SCHEMA
566
+ - INPUT
567
+ - OUTPUT
568
+ - BENCHMARKS
569
+ - EXAMPLE
570
+
571
+ ### multiplexer
572
+
573
+ - `log2(a)`
574
+
575
+ - DESCRIPTION
576
+ - SCHEMA
577
+ - INPUT
578
+ - OUTPUT
579
+ - BENCHMARKS
580
+ - EXAMPLE
581
+
582
+ - `EscalarProduct(w)`
583
+
584
+ - DESCRIPTION
585
+ - SCHEMA
586
+ - INPUT
587
+ - OUTPUT
588
+ - BENCHMARKS
589
+ - EXAMPLE
590
+
591
+ - `Decoder(w)`
592
+
593
+ - DESCRIPTION
594
+ - SCHEMA
595
+ - INPUT
596
+ - OUTPUT
597
+ - BENCHMARKS
598
+ - EXAMPLE
599
+
600
+ - `Multiplexer(wIn, nIn)`
601
+
602
+ - DESCRIPTION
603
+ - SCHEMA
604
+ - INPUT
605
+ - OUTPUT
606
+ - BENCHMARKS
607
+ - EXAMPLE
608
+
609
+ ### mux1
610
+
611
+ - `MultiMux1(n)`
612
+
613
+ - DESCRIPTION
614
+ - SCHEMA
615
+ - INPUT
616
+ - OUTPUT
617
+ - BENCHMARKS
618
+ - EXAMPLE
619
+
620
+ - `Mux1()`
621
+
622
+ - DESCRIPTION
623
+ - SCHEMA
624
+ - INPUT
625
+ - OUTPUT
626
+ - BENCHMARKS
627
+ - EXAMPLE
628
+
629
+ ### mux2
630
+
631
+ - `MultiMux2(n)`
632
+
633
+ - DESCRIPTION
634
+ - SCHEMA
635
+ - INPUT
636
+ - OUTPUT
637
+ - BENCHMARKS
638
+ - EXAMPLE
639
+
640
+ - `Mux2()`
641
+
642
+ - DESCRIPTION
643
+ - SCHEMA
644
+ - INPUT
645
+ - OUTPUT
646
+ - BENCHMARKS
647
+ - EXAMPLE
648
+
649
+ ### mux3
650
+
651
+ - `MultiMux3(n)`
652
+
653
+ - DESCRIPTION
654
+ - SCHEMA
655
+ - INPUT
656
+ - OUTPUT
657
+ - BENCHMARKS
658
+ - EXAMPLE
659
+
660
+ - `Mux3()`
661
+
662
+ - DESCRIPTION
663
+ - SCHEMA
664
+ - INPUT
665
+ - OUTPUT
666
+ - BENCHMARKS
667
+ - EXAMPLE
668
+
669
+ ### mux4
670
+
671
+ - `MultiMux4(n)`
672
+
673
+ - DESCRIPTION
674
+ - SCHEMA
675
+ - INPUT
676
+ - OUTPUT
677
+ - BENCHMARKS
678
+ - EXAMPLE
679
+
680
+ - `Mux4()`
681
+
682
+ - DESCRIPTION
683
+ - SCHEMA
684
+ - INPUT
685
+ - OUTPUT
686
+ - BENCHMARKS
687
+ - EXAMPLE
688
+
689
+ ### pedersen_old
690
+
691
+ Old version of the Pedersen hash (do not use any
692
+ more?).
693
+
694
+ ### pedersen
695
+
696
+ - `Window4()`
697
+
698
+ - DESCRIPTION
699
+ - SCHEMA
700
+ - INPUT
701
+ - OUTPUT
702
+ - BENCHMARKS
703
+ - EXAMPLE
704
+
705
+ - `Segment(nWindows)`
706
+
707
+ - DESCRIPTION
708
+ - SCHEMA
709
+ - INPUT
710
+ - OUTPUT
711
+ - BENCHMARKS
712
+ - EXAMPLE
713
+
714
+ - `Pedersen(n)`
715
+
716
+ - DESCRIPTION
717
+ - SCHEMA
718
+ - INPUT
719
+ - OUTPUT
720
+ - BENCHMARKS
721
+ - EXAMPLE
722
+
723
+ ### pointbits
724
+
725
+ - `sqrt(n)`
726
+
727
+ - DESCRIPTION
728
+ - SCHEMA
729
+ - INPUT
730
+ - OUTPUT
731
+ - BENCHMARKS
732
+ - EXAMPLE
733
+
734
+ - `Bits2Point()`
735
+
736
+ - DESCRIPTION
737
+ - SCHEMA
738
+ - INPUT
739
+ - OUTPUT
740
+ - BENCHMARKS
741
+ - EXAMPLE
742
+
743
+ - `Bits2Point_Strict()`
744
+
745
+ - DESCRIPTION
746
+ - SCHEMA
747
+ - INPUT
748
+ - OUTPUT
749
+ - BENCHMARKS
750
+ - EXAMPLE
751
+
752
+ - `Point2Bits`
753
+
754
+ - DESCRIPTION
755
+ - SCHEMA
756
+ - INPUT
757
+ - OUTPUT
758
+ - BENCHMARKS
759
+ - EXAMPLE
760
+
761
+ - `Point2Bits_Strict`
762
+
763
+ - DESCRIPTION
764
+ - SCHEMA
765
+ - INPUT
766
+ - OUTPUT
767
+ - BENCHMARKS
768
+ - EXAMPLE
769
+
770
+ ### poseidon
771
+
772
+ Implementation of Poseidon hash function (LINK)
773
+
774
+ - `Sigma()`
775
+
776
+ - DESCRIPTION
777
+ - SCHEMA
778
+ - INPUT
779
+ - OUTPUT
780
+ - BENCHMARKS
781
+ - EXAMPLE
782
+
783
+ - `Ark(t, C, r)`
784
+
785
+ - DESCRIPTION
786
+ - SCHEMA
787
+ - INPUT
788
+ - OUTPUT
789
+ - BENCHMARKS
790
+ - EXAMPLE
791
+
792
+ - `Mix(t, M)`
793
+
794
+ - DESCRIPTION
795
+ - SCHEMA
796
+ - INPUT
797
+ - OUTPUT
798
+ - BENCHMARKS
799
+ - EXAMPLE
800
+
801
+ - `Poseidon(nInputs)`
802
+
803
+ - DESCRIPTION
804
+ - SCHEMA
805
+ - INPUT
806
+ - OUTPUT
807
+ - BENCHMARKS
808
+ - EXAMPLE
809
+
810
+ ### sign
811
+
812
+ - `Sign()`
813
+
814
+ - DESCRIPTION
815
+ - SCHEMA
816
+ - INPUT
817
+ - OUTPUT
818
+ - BENCHMARKS
819
+ - EXAMPLE
820
+
821
+ ### switcher
822
+
823
+ - `Switcher()`
824
+
825
+ - DESCRIPTION
826
+ - SCHEMA
827
+ - INPUT
828
+ - OUTPUT
829
+ - BENCHMARKS
830
+ - EXAMPLE