Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 1.41 KB

Day20.md

File metadata and controls

21 lines (11 loc) · 1.41 KB

#DaysOfZeroKnowledge. Day 20.

In the following days, we’ll cover the various techniques to write circuits, and show you how to create and verify proofs off-chain and on-chain on ethereum. Today we are going to learn the pre-requisites to create and execute our first ZK proof using circom and snarkjs libraries.

First off, make sure you have a recent version of Node.js installed.

Install Node.js

Now, to install circom and snarkjs run the following commands:

Install circom and snarkjs

Once that we’ve installed circom and snarkjs, let’s build a circuit that we know two numbers (call them "in1" and "in2") that multiply together to give "out", without revealing "in1" and "in2".

What is a circuit?

Even though the verifier has zero knowledge about the private inputs to the circuit, the proof, the output, and the public inputs(s) will be enough to convince her that our statement is valid (hence the term zero-knowledge proof).

Now that we know what a circuit is and why it’s useful, tomorrow we are going to start by designing one.

That's all for this thread. Thank you for reading! If you liked, follow me @Hasseru and retweet.