🪑 Session chair: Akira (Duties: Read material above-average carefully 🤓; prepare fallback discussions/questions (worst-case: just prepare some quiz questions about the material) 🙋. Prepare a few slides to guide the session through subtopics (this is not supposed to be a detailed summary of the material) ✍️ Notetaker: Jan/Akira (Duties: Take Obsidian notes during the session 📝. Moderate to get input for the wiki pages 🧠. Make people summarize / dumb down discussion results to keep things comprehensible for everyone 🧑⚖️.)
🎯 Goals
This session serves as a bird’s-eye overview of recent (ZK)SNARKs and real-world applications. We will particularly focus on the following contents from Lecture 2 (see 📚 Material).
-
SNARK overview
- Parse “Succinct Non-interactive ARgument of Knowledge”
- Blockchain applications
- Example: SNARK for correctly processed photos
-
Paradigm of building SNARKs
- IOP + FCOM = SNARK
- Schwartz-Zippel lemma
- Example: Poly-IOP for equality test
- Example: Poly-IOP for set inclusion test
❓ Quiz Questions
You are encouraged to think about the following questions before the session starts.
- In which blockchain applications, SNARK without ZK is sufficient?
- What are the statement and witness in the photo-processing example?
- What kind of attack would be possible if the signature is missing?
- Why is preprocessing useful?
- In the equality test protocol, what happens if the prover doesn’t respect the degree bound?
- In the set inclusion test protocol, what happens if the oracle sent by the prover is not a polynomial?
- Schwartz-Zippel applications. If I give you oracle access to polynomials (i.e. a box you give and it replies with (or or depending on what you want), how do you
- Check that ? (i.e. is the zero polynomial; all its coefficients are zero)
- Check that ?
- Check that ?
- How likely is it that your test fails?
- How should (knowledge) soundness and ZK be defined for IOPs?
- When compiling IOP, what properties should the functional commitment satisfy to obtain zkSNARK?
📚 Material
- Lecture (slides) Additional (optional) material can be found on https://zk-learning.org.
📝 Notes
Subsession 1 (June 29)
How big is a witness usually?
- For languages, per definition, the witness is at most polynomial length in the statement.
- If witnesses are length, then the language is in (since then you can just try out all potential witnesses in polynomial time and decide the language with that).
- We can do ZK, PoK proofs for languages in , but they’re trivial: The extractor doesn’t need the help of the prover to compute a witness, and the ZK simulator can just compute a witness and run the protocol honestly.
- (Concretely, maybe you still want to compress the witness with a SNARG if the constants hidden in the notation are large, but complexity-theoretically, nothing interesting is happening here)
- Witnesses should usually be thought of as poly size.
- A SNARK effectively compresses a witness from poly length to polylog length (or even to constant length) using computational assumptions.
- Note that “polylog or constant length” here means or , i.e. a security parameter is involved and ensures that in practice, I cannot just try out all possible SNARK proofs in order to gain insight about a statement’s validity (in contrast to what we argued above regarding log-length witnesses).
Blockchain rollups
Statement , witness , relation
Photo misinformation
Statement , witness , relation
- Enables a short proof of photo validity (e.g., only cropped, scaled) instead of having to download/check the full photo to check the signature .
- May also be nice to prove things in ZK, e.g., “I’ve only applied some face blur, otherwise the photo is the original”, where we wouldn’t want to reveal the unedited photo at all (and hence need ZK).
Why is preprocessing useful?
- First: need some sort of setup for security.
- Simulator/extractor need to be able to “cheat” somehow since normal users shouldn’t be able to simulate or extract.
- For interactive proofs (01 History and Basics), we gave the simulator the ability to “compute the protocol messages out of order” and the extractor was allowed to “ask the prover multiple questions by Rewinding”.
- Intuitively, this doesn’t fly anymore for non-interactive proofs like SNARKs because there is no interaction; the prover just sends the proof to the verifier ^[in a way, we can cheat back interaction even for non-interactive proofs by looking at the prover’s interaction with a Random Oracle, see Fiat-Shamir].
- Second: Someone trusted by the verifier needs to read the full statement at some point.
- If the verifier does it themselves, then the verifier’s runtime is at least linear in the statement size, which we want to avoid (though this is the case in Bulletproofs, for example).
- The preprocessing step is the step where a trusted party reads and “summarizes” the statement for the verifier, which makes the verifier very efficient, not even having to read the statement.
Preprocessing vs transparent setup
Who reads the full statement/circuit in a Transparent Setup or ROM-setup scenario?
IOPs
We talked about IOPs, trying to understand what they’re about. Quick summary: It’s like an interactive protocol, but instead of sending a message, the prover sends a “box” that contains some function . The verifier can then query the box for for some of its choice.
Why not just have the verifier send and the prover respond with ?
A crucial component for IOPs is that the prover first commits to the function before seeing what question the verifier is going to ask. Indeed, when instantiating the IOP, we will replace the “box” with a Functional Commitment, ensuring that the prover cannot change its mind about after seeing .
Subsession 2 (July 6)
Plan: A closer look at the toy example for some of the IOP techniques.