# Modern ZK Crypto - Session 2 Lecture Notes **How to use these notes**: These notes are meant to go along with slides and recordings. If you're following along with either the slides or the course recordings, and want to dig deeper into some topic mentioned, look for the appropriate header below for additional links or context. ## What is a zkSNARK? This will be covererd in more detail later, but there are plenty of great resources to understand how zkSNARKs work, their academic lineage, etc. - For folks coming from complexity theory: [a succinct story of zero-knowledge](https://nibnalin.me/dust-nib/a-succinct-story-of-zero-knowledge.html) - [ZCash: What are zkSNARKs?](https://z.cash/technology/zksnarks/) (intro section only; the rest of this starts going deeper into the math) ## circom/snarkjs/zkREPL Demo If you're interested in infrastructure or developer tools, zkREPL is a really cool example of a useful ZK dev tool. Read more about it [here](https://0xparc.org/blog/zkrepl), or watch Kevin Kwok's talk [here](https://www.youtube.com/watch?v=xoN3Ph836n4&list=PLJijNYoOwnssZzIIxfochRxo5QRW5Uvfg&index=16). ### circomlib [circomlib](https://github.com/iden3/circomlib/tree/master/circuits) contains a listing of audited, common circuit buidling blocks. You can find many of the circuits we're discussing today in this library. ### Field size and BN254 All signals in circom are field elements in the prime field of order ``` r = 21888242871839275222246405745257275088548364400416034343698204186575808495617 ``` This is a 254-bit prime known as the BabyJubJub prime. It's the curve order for BN254, a pairing-friendly elliptic curve used by Ethereum and (formerly) ZCash. You can read more about BN254 in Jonathan Wang's excellent document [here](https://hackmd.io/@jpw/bn254). ### (To be filled in after lecture) zkREPL links ## ZK Applications ### zkmessage More information on this is linked in the [Modern ZK Crypto - Session 1 Exercises](/Z7zmx-MLT_uxTd48x-mkoA). ### Dark Forest You can read more about Dark Forest in [this blog post](https://blog.zkga.me/announcing-darkforest). If you're interested in digging deeper, here's a [video](https://youtu.be/1C0z3bR-YdE) (30m) on the "decentralized incomplete information game" paradox, and some ZK constructions for decentralized games. Here's another [video](https://www.youtube.com/watch?v=z7V830zndoA) (30m) on why decentralized games are interesting. ### Tornado Cash Tornado Cash uses the same ZK construction as the anonymous voting app that we discussed in the first session. We dig deeper into how Tornado Cash works [here](https://learn.0xparc.org/materials/circom/learning-group-1/breaking-down-tornado), and we'll discuss it later in the course as well. ### ZKML You can check out a collection of resources for ZKML [here](https://0xparc.notion.site/public-ZK-resources-for-ML-specialists-70770f20778446d596aa340c2f47d4b2).