a16z: How to Understand Zero Knowledge Proofs with the Logic of Magic
This article is from | a16z
Original author | Michael Blau
Translated by | Odaily Azuma

Editor's note: Zero-knowledge proofs (ZKPs) have been hailed as the "cheat code" for Crypto's development in scalability, privacy, and other areas. However, most of the explanatory content for this concept is aimed at people with a certain background in computer science or cryptography, so for most ordinary users, there are still some barriers to fully understanding the concept itself.
On September 8th, a16z partner Michael Blau published an informative article about zero-knowledge proofs. The article cleverly avoids the more abstract mathematical speculation of the concept itself and instead uses magic tricks to illustrate the utility of ZKPs.
Below is the translation of Michael Blau's original article (written in first person) by Odaily. For the sake of readability, some modifications have been made.

The author of "2001: A Space Odyssey," Clarke, said: "Any sufficiently advanced technology is indistinguishable from magic."
Zero-knowledge proof is one of those magical technologies. It is actually a cryptographic concept that can be used to solve two major challenges in Web3 - scalability and privacy.
From a utility perspective, adopting zero-knowledge proofs helps reduce transaction fees on the chain and design privacy-oriented apps, thereby promoting the spread of Crypto to billions of users. Apart from Crypto, ZKPs also have the potential to be applied to secure the transmission of sensitive data, helping to combat illegal financial systems or counter widespread fraud information.
But what exactly is a zero-knowledge proof? For a few researchers and developers, there are many detailed explanations available online, but these contents are not aimed at ordinary users with less experience in computer science or cryptography. Although some pioneers have written popular science articles using analogies, as of today, it is still not a simple task to find a concise and accessible explanation of zero-knowledge proofs to help ordinary people grasp their magic accurately.
So in this article, I combine my background in Crypto and the magic industry to explore a new analogy - imagine zero-knowledge proofs as a great magic trick.

First, there are some fundamental knowledge to cover
I will start by sharing an "advanced" definition of zero-knowledge proof (particularly its classical algorithm, zk-SNARK), as well as its main properties, and then correspond these "components" to a magic trick one by one.
The definition given by Justin Thaler, a research partner at a16z, for zk-SNARK is: "zk-SNARK allows someone (the prover) to prove to another person (the verifier) that they know some data, without revealing any information about the data itself."
The definition given by MIT's course is: "Zero-knowledge protocol allows me to prove to you that I know a fact, without needing to tell you the fact itself."
This has significant application value in the context of blockchain narratives because:
(corresponding to privacy) Zero-knowledge proofs can protect private information while allowing others to verify the authenticity of the information.
(Corresponding Expansion) Zero-knowledge proofs can "simplify" and "reduce" workloads. "Simplify" means that the size of the "proof" is smaller than the data being proved; "reduce" means that the efficiency for verifiers to verify the "proof" is higher than analyzing the original "data" itself. On Ethereum, this means that less data will be processed by smart contracts, resulting in lower gas costs for users. Layer2 can also take advantage of these features to allow Dapps to process more data at a lower cost.
In summary, zero-knowledge proofs have two main properties:
1. Privacy: The "data" (or "fact" or "knowledge") being proved is not revealed to the verifier.
2. Scalability: Verifying the "proof" is more efficient than directly analyzing the original "data".
This is the classic explanation of zero-knowledge proofs, but it still sounds like a riddle — how can someone prove they know something without sharing the information?
Let's take a look at this definition again, but this time, let's perform a magic trick.
Magic itself is a zero-knowledge proof.
Simply put, in a magic performance, "magic" itself is a zero-knowledge proof. In order to complete a magic trick, the "magician" needs to know the "secret" behind it. They can perform the trick only if they know this secret. However, they definitely don't want to reveal this secret to the "audience" - that would obviously ruin the effect of the magic trick.
Odaily Note: Four roles are highlighted in quotation marks here.
"Secret" corresponds to the original "data";
"Magic" corresponds to "proof";
"Magician" corresponds to "prover";
"Audience" corresponds to "verifier".
Next, we will incorporate the "advanced" definition of zero-knowledge proof from the previous paragraph into this magic trick. Imagine the magician as the "prover" and the audience as the "verifier".
The magic performance is the process of the "prover" proving to the "verifier". If the performance is successful, it is equivalent to the proof being valid, and the audience can also confirm that the magician definitely knows the secret behind it; if the performance fails, it means the proof is invalid, and the audience, in addition to being disappointed, realizes that the magician may not be aware of the relevant techniques.
Obviously, magic clearly demonstrates the privacy of zero-knowledge proof, as the audience is never informed of what the secret behind it actually is. But what about scalability? Let us continue with this analogy...
If the audience wants to know whether the magician has mastered the secret ("prover" understands the original "data"), they can completely skip the normal performance and simply ask the magician to share the secret itself. However, magic tricks are generally quite complex and intricate, and it is difficult for the audience to understand the design mechanisms and implementation effects of these techniques in a short amount of time, let alone fully master them. In fact, the magician can even provide a false technique that the audience would find it difficult to distinguish its authenticity. Therefore, to verify the proof, it is necessary for the audience to watch the entire performance carefully and thoroughly analyze each step, so as to make an accurate judgment.
It often takes a long time and a large amount of work to prove something by analyzing the secret itself.
This is similar to the fact that directly analyzing the original "data" is more time-consuming and laborious. The efficiency of verifying the "proof" will be higher, and the scalability of zero knowledge proofs is revealed behind it.
Using playing cards as an example
Let's take a simple example. Suppose I brag that I have the skill of "reverse shuffling" and can shuffle a messy deck of cards into the desired order. How can I prove it to you?

The most efficient way is for me to directly shuffle a deck of cards with a certain pattern, and when you see this deck of cards, you can confirm that I do have this skill. This doesn't require me to share the technique with you and is faster than learning it yourself.
In conclusion, I hope this analogy helps to unveil the mystery of zero-knowledge proofs. The explanation of "magic," "secrets," "magicians," and "audiences" can serve as an effective model for understanding the key features of zero-knowledge proofs and help more ordinary users grasp this concept.
Once again, magic is essentially a zero-knowledge proof, just like magic tricks.


