Circuits
Arithmetic circuits
Circuit is like a program , which can be written in a programming language like Circom. However, internally a circuit is a constraint system; that is, a list of constraints which have a algebric forms;
Since circuits are bit difficult for developers, we have programming languages (called DSL) for writing circuit logic. Domain specific language (DSL) : Circom, ZoKrates, Leo, Zinc, Cairo etc
Once you written your program, it goes for compilation which converts the DSL into SNARK friendly format (R1CS, AIR, plonk-CG etc)
Once we convert into SNARK friendly format (constraint system), we generate public parameters (Sp, Sv) which is feeded into SNARK prover function to generate zk-proof.

Circom
circom allows programmers to define the constraints that define the arithmetic circuit. All constraints must be of the form A*B + C = 0, where A, B and C are linear combinations of signals. The arithmetic circuits built using circom operate on signals (inputs and outputs).
Zero-knowledge permits proving circuit satisfiability. What this means is, that you can prove that you know a set of signals that satisfy the circuit, or in other words, that you know a solution to the R1CS. This set of signals is called the witness.
Last updated