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

Blockchain

A picture of the stolen Bitcoin exchange in the past years

This infographic is mainly to summarize the past money currency exchanges and then display them in a visual form. The...

Blockchain

The user information of the currency circle has been leaked on a large scale, and the fire currency and the currency security have issued risk warnings one after another.

On August 6th, a large number of users of the currency said that they received a call from a customer service company...

Opinion

What do legal experts think of the SBF trial?

If SBF is convicted of one or more charges he is facing, the length of time he will spend in prison will largely depe...

Blockchain

Coinbase becomes Tezos' largest verification node, will it be a new trend for exchanges?

Original: Cryptopotato , original author: Jordan Lyanchev Source: Odaily Planet Daily, Translator: Yu Shunsui Accordi...

Blockchain

Circle stripped Poloniex, its valuation plummeted 80%

Circle is a world-renowned blockchain startup with investors including Goldman Sachs, IDG Capital, Bitcoin and hedge ...

Blockchain

Get Ready for a Jaw-Dropping 90% Asset Return by Q2 2024 FTX Customers in for a Thrilling Ride with New Amended Proposal!

Exciting news for customers of defunct cryptocurrency exchanges FTX and FTX.US - an updated proposal offers hope of r...