In the circuit.circom, I have illustrated a simple quadratic circuit using circom. With the help of circom and snarkjs we can proof zksnarks.
x --> Private input
c --> Public input
- Give permission to all the script file
chmod +x *.sh
- Build the circuit with the help of circom
./build_circuit.sh -c circuit
- Create setup phase using the help of power of tau and snarkjs
./setup.sh -c circuit
- Generate witness
./generate_witness.sh -c circuit -i input
- Create Proof
./create_proof.sh -i input
- Verify Proof
./verify_proof.sh
If the final output is [INFO] snarkJS: OK!
then user knowns the solution of the above equation for given c.