This is a series of lectures on zero-knowledge conducted internally at Blockstream and Distributed Lab, in which we covered essentials for Research and Development in the field of zero-knowledge proofs and their applications.
Currently, the largest problem in zero-knowledge field is the diversity of learning material, which is oftentimes either:
- Too high-level, focusing on the applications and not providing the necessary background in Mathematics and Cryptography.
- Too low-level (such as Protocol papers), which are complete from the Mathematics and Cryptography standpoints, but are tremendously hard for practitioners to understand.
- Low-level enough, but incomplete: sometimes, material explains all the constructions needed to understand a certain protocol, but does not summarize it into the complete algorithm which is ``implementable''.
- We dedicate a significant portion of the book to the Mathematics, which is the foundation of cryptography and zero-knowledge proofs: Number and Group Theory, Polynomials (Schwartz-Zippel Lemma, in particular), Finite Fields and Field Extensions.
- Next, we move to the Cryptographic Preliminaries, consisting mainly of Elliptic Curve Theory: we cover the basics of operations over Elliptic Curves, Projective Coordinates, and ecpairing. We proceed to the Commitment Schemes and explain how to formulate security definitions in Cryptography.
- The Zero-Knowledge Proofs section is the core of the book. We start with the basic definitions and classical ZK protocols and proceed to the modern constructions, currently consisting of Sigma Protocols, pairing-based zk-SNARKs (R1CS, QAP, Pinocchio+Groth16, PlonKish Arithmetization), Bulletproofs, Sum-Check protocols (GKR), and lookup tables. However, this is just a beginning: we will add more protocols such as zk-STARKs in the future.
The book is fully open-source and all suggestions and contributions are very welcome! The repository is structured as follows:
| Folder/File | Description |
|---|---|
contents |
Contains the written material for the book in .tex format. If you want to add your section/chapter or make corrections to existing ones, you need to navigate to this folder. |
contents/images |
Contains images used in the book sections/lectures. |
presentations |
Contains the beamer presentations for the lectures being conducted at Blockstream (and formerly Distributed Lab). Typically, they contain the same material as the corresponding section in the book. However, you might find it easier to grasp the material from them. |
config |
The style/template files for the book. |
book.tex |
The compilation of all lectures in the single file (essentially a book). Uses section files from contents and compiles them into a single file. |
sage |
Contains the SageMath code used in some lectures. For the most part, if the code is present, the separate repository is used, such as for Sigma Proofs |
- Download LaTeX locally (e.g. TeX Live, if you are using MacOS: MacTex).
- Download relevant VSCode extensions: LaTex, LaTex Workshop etc.
- Clone the repository.
- Open in VSCode and run the
book.texfile (green arrow at the top of the window). - You can also compile each book section separately by following the
same procedure for the corresponding
.texfile in thecontentsfolder. Note that compiled.pdffiles are ignored by.gitignoreand are not pushed to the repository to avoid possible conflicts.
- Conduct the steps above and make sure you can compile everything locally.
- Create a new
.texfile in thecontentsfolder in the appropriate chapter folder. Name it in the format<number>-<topic>.tex. - Add lecture to the
book.texfile. For example, if the code looks as: - To add the presentation, navigate to the
presentationsfolder and add the same name as for your lecture file with the appropriate number.
The book is released under the MIT License.
