Filling-in The Details of Vitalik’s Excellent zk-SNARKs Article For QAP Processing

--

The demo for R1CS and QAP is given here.

zk-SNARKs is used in blockchain and cryptography applications to provide zero-knowledge proofs — these are fairly easy to create and then are quick to check. We can use them to prove that Bob has enough cryptocurrency to pay Alice, without revealing any of the details of his transactions.

In 2017, Vitalik Buterin provided the classic explanation of zk-SNARKs here (2K claps on Medium):

You really have to read it. But, most people lose it in the translation from R1CS to QAP (Quadratic Arithmetic Program), as the examples make sense, but he skips over some of the details. So let’s go through the R1CS and QAP processes, and use a real-life example. I will use a finite field prime value of r=11, in order to keep our numbers small, but in real-life we would be using a large prime number. All of the values we will have will range from 0 to 10 (the finite field).

--

--

Prof Bill Buchanan OBE FRSE
ASecuritySite: When Bob Met Alice

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.