How to Prove a Secret A Guide to Zero-Knowledge Proofs from Magicians

Guide to Zero-Knowledge Proofs for Secrets from Magicians

Author: 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.

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!

Share:

Was this article helpful?

93 out of 132 found this helpful

Discover more

News

Policy reshuffle is intensified: the crisis and new life of virtual currency exchanges

The virtual currency exchange industry may have to "change the sky", which seems to be the consensus of the...

Policy

Jurors buckle up as Sam Bankman-Fried's criminal trial takes off with riveting jury directions

SBF faces seven charges of financial fraud in connection with FTX's downfall in November.

Blockchain

Bitfinex abolishes the minimum balance threshold of $10,000

Bitfinex, a Hong Kong-based cryptocurrency exchange, is now open to all traders as they canceled a minimum entry thre...

Blockchain

Hilariously Hot Crypto Drama: FTX and Genesis Global Trading Settle for a Cool $175 Million

Bankruptcy Court Approves $175 Million Settlement between Cryptocurrency Companies FTX and Genesis in New York

Market

Multiple macroeconomic negative factors have hit the market, causing Bitcoin to drop below 26,000 US dollars in the short term.

24-hour bitcoin price analysis chart shows that bitcoin is in a strong downtrend, with bears dominating the market.

Blockchain

Hong Kong Cryptocurrency New Policy's One-Year Anniversary A Year of Major Leaps and Key Milestone Review

Over the past year, Hong Kong has made great progress and shown strategic development in virtual asset policies. Sinc...