How to Prove a Secret A Guide to Zero-Knowledge Proofs from Magicians
Guide to Zero-Knowledge Proofs for Secrets from MagiciansAuthor: Michael Blau, a16zcrypto investment partner; Translation: LianGuaixiaozou
Any sufficiently advanced technology is indistinguishable from magic, and one area that resembles science fiction is zero-knowledge proofs (ZKPs). ZKPs are an encryption tool that can address two key challenges in the Web3 world: scalability and privacy. It is worth noting that ZKPs could be the key to unlocking lower transaction fees and designing new privacy protection applications, which could result in the next billion crypto users. Even outside the crypto world, ZKPs may one day help secure the transmission of sensitive data and combat illegal finance or fake information.
But what is a ZKP? There are many good explanations for engineers, researchers, and the crypto community, but they may not be easily understood by those with less experience in encryption technology or computer science. Even with plenty of available metaphors – from Waldo to Alibaba’s Cave – it is not easy to find an accurate and easily understandable explanation that fully illustrates the superpowers of ZKPs.
So in this article, I combine my background in encryption and magic to explore and attempt to make a new metaphor: imagine ZKPs as a great magic trick.
- Dune SQL and Ethereum Data Analysis Advanced Guide
- The Core Function of Data Availability in Layer2
- Consensys Global Survey How is Web3 perceived around the world?
But first, let’s understand: what is a zero-knowledge proof?
I would like to start by sharing an advanced definition of ZKPs (especially regarding zk-SNARKs) and its various properties, and then map these properties to a metaphor of magic.
Let’s expand on the definition of SNARKs by a16z crypto research partner Justin Thaler: “zk-SNARK allows someone (the prover) to prove to an untrusted party (the verifier) that they know some data without revealing any information about the data itself.” Or, as mentioned in the MIT AIP ZK course, “zero-knowledge protocols allow me to prove to you that I know something without telling you the specific content of that thing.”
This is exciting in the context of public blockchains because ZKPs can protect privacy while allowing anyone (without a doubt) to verify the authenticity of information. zk-SNARKs are also concise and efficient: “concise” means that the size of the proof is smaller than the data being proven. “Efficient” means that the verifier can verify the proof faster than analyzing the original data (on Ethereum, this means less data for smart contracts to process and lower gas costs for users). L2 blockchains can leverage the conciseness and efficiency of zk-SNARKs to allow decentralized applications to process more data at a lower cost.
In summary, zk-SNARKs have two main properties:
· Privacy: The data (or fact or “knowledge”) you are proving will not reveal any information to the verifier.
· Concise and efficient: Verifying the proof is more efficient than directly inspecting the original data.
Even this high-level description may sound like a riddle: How can someone prove they know something without sharing information?
Let’s take a look at this definition again, but this time, let’s use some magic tricks.
Zero-Knowledge Proof Magic
Simply put, magic is zero-knowledge proof. In magic, magicians claim to know a secret that allows them to perform magic tricks. However, they don’t want to reveal this secret to the audience – that would ruin their tricks.
Expanding this to ZKP: think of the magician as the “prover” and the audience as the “verifier”. A successful magic performance (hoping to receive incredible amazement and enthusiastic applause) is similar to an “effective” proof: the magic trick is successful, so the magician must know the secret behind the magic performance. Of course, if the illusion doesn’t work, the proof is “invalid”, and the audience will be disappointed, as the magician may not actually know the secret method.
Magic demonstrates one attribute of ZKP: privacy. But what about simplicity and efficiency? Let’s get back to this metaphor…
The audience can completely skip the performance and simply ask the magician to share the secret behind the magic. But the secret of magic may be complex and intricate. Even just explaining the method of a magic trick, along with all its subtleties and nuances, would take a long time to understand the gist, let alone understand the mystery within. Sometimes, when asked to reveal their secrets, magicians may intentionally reveal a “wrong” solution to the audience, leading them down the wrong path. If the audience cannot grasp this skill themselves, they cannot determine definitively whether the magic trick is truly effective – mastering this skill may take days, months, or even years.
Therefore, just as directly checking the correctness of the secret method is actually very time-consuming and laborious – even if the magician is willing to reveal the secret to the audience – ZKP is also the same. For the audience, it is much faster to verify the effectiveness of the secret method simply by appreciating the performance.
Shuffling the Deck
Let’s take a simple example: I claim to know a secret method that can immediately restore a deck of cards that has been shuffled with both sides facing up and down into a deck with only one side facing up. I want to prove to you that I have this ability, but I don’t want to reveal the specific principle. At the end of the magic trick, showing everyone a deck of cards with only one side facing up is an effective proof, proving that I must know the secret method of “restoring” the cards. And when I show you the deck with only one side facing up, you can immediately verify my claim, which is much faster than personally learning the magic trick.
We will continue to update Blocking; if you have any questions or suggestions, please contact us!
Was this article helpful?
93 out of 132 found this helpful
Related articles
- Understanding the Account Abstraction That Determines the Future of Web3 in One Article
- CertiK Security Report Nearly 1 billion USD will be stolen in 2023 due to fraud, vulnerability exploitation, and hacker attacks.
- Doodles version of the holey shoes sold out in 3 days, blue-chip NFTs sell to save themselves.
- With the innovative low transaction volume, where is the way out for NFTs?
- After Vitalik’s account was hacked, he released phishing information. Besides phishing attacks, what other ways of fund fraud should users be alert to?
- Opinion If the Bot track cannot achieve an unforkable state, it will be very difficult to achieve sustainable revenue.
- Will Micro-Rollup be the next wave when applications become Rollup?