Skip to content

Commit

Permalink
circuit compiled & zksnark logic is done
Browse files Browse the repository at this point in the history
  • Loading branch information
niqbal-vhs committed Aug 29, 2022
1 parent 1dbfe56 commit 382908d
Show file tree
Hide file tree
Showing 19 changed files with 1,081 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/zk-snark-example.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions circuit/circuit.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
template Multiplier() {
signal private input a;
signal private input b;
signal output c;

c <== a*b;
}
component main = Multiplier();
Binary file added circuit_compiled/circuit.r1cs
Binary file not shown.
34 changes: 34 additions & 0 deletions circuit_compiled/circuit.r1cs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"n8": 32,
"prime": "21888242871839275222246405745257275088548364400416034343698204186575808495617",
"nVars": 4,
"nOutputs": 1,
"nPubInputs": 0,
"nPrvInputs": 2,
"nLabels": 4,
"nConstraints": 1,
"useCustomGates": false,
"constraints": [
[
{
"2": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
},
{
"3": "1"
},
{
"1": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
}
]
],
"map": [
0,
3,
1,
2
],
"customGates": [
],
"customGatesUses": [
]
}
3 changes: 3 additions & 0 deletions circuit_compiled/circuit.sym
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1,2,0,main.a
2,3,0,main.b
3,1,0,main.c
Binary file added circuit_compiled/circuit.wasm
Binary file not shown.
1 change: 1 addition & 0 deletions input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"a": 3, "b": 11}
Binary file added keys/powerOfTau_final.ptau
Binary file not shown.
Loading

0 comments on commit 382908d

Please sign in to comment.