This module is optional, you should skip to the Module 4 and if you wish to understand the zkSNARKS and develop low level infrastructure tools/apps or want to do some improvements to the mina and o1js itself, then you can study this part.
Of course you might say that you are not into such deep levels of the ZK. We accept that those are so mathematical, such that o1js handles with all of them. If you are not familiar with ZK, studying these concepts just for understanding the underlying Zero-Knowledge concept (especially ZK Circuit) will be enough. (meaning that, you are not supposed to build your own zk Framework, just understand why and how o1js uses zk.)
This module is where zero-knowledge proofs and Snarks are going to be explained. You are not supposed to know Zk proofs deeply, but understanding some key terms like witness Public Input and Private Input is essential while you develop zkApps. First, see what ZK proofs are in a mathematical sense, since it is essential for your further development understanding the underlying mathematics
For a simple understanding of what Zero-Knowledge proofs are, please see these resourceS:
First, start by what is a circuit? By circuits, we mean Arithmetic Circuits:
- Electric Coin article
- What is a SNARK by Dan Boneh
- What is a zkSNARK by Dan Boneh
- A Gentle Introduction to Snarks This one is a little mathematical, but checking the SNARK parts might give you a hint about it.
In the above, we have drawn very heavily from blog posts written by Vitalik Buterin, Electric Coin, and Maurizio Binello. However, these are only some of the many pathways towards understanding zkSNARK construction.
Since it is always helpful to take a look at the same problem from different angles, we recommend you visit the following resources:
- Why and How zk-SNARK Works (highly recommended) - Originally a paper by Maksym Petkus, it dives into the specifics of how a zkSNARK is constructed, it has been converted to a series of blog posts for easy consumption.
- ZK Whiteboard Sessions - ZkHack explains various topics in a nice and clear way. Use those resources in case you want to learn deeper.
- MoonMath Manual Chapter 8