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

User information is not guaranteed? UK Customs and Excise Department asks cryptocurrency exchanges for transaction data

According to Coindesk's August 7 report, the UK tax authority, the HMRC, is putting pressure on cryptocurrency e...

Opinion

Exclusive Interview with dYdX Foundation CEO dYdX Chain Abandons Off-chain Order Book, Aims to Become Public Infrastructure

The CEO of the dYdX Foundation, Charles, believes that dYdX will develop towards becoming a derivative giant, and bec...

Blockchain

The consensus of using "money" to forge coins - a high-tech that condenses developers' miners' exchanges and users

In 1776, the American Revolutionary War broke out. Why is this war going to fight? The American side said that "...

Blockchain

Comment: The exchange is open finance

Foreword: In the current encryption world, exchanges are the biggest catchers of value. Because of the user's de...

Blockchain

Compliance, endorsement path: inventory cryptocurrency exchange registration holy place

The increase was 132.58%. Tongcheng Holdings announced that it had changed its name to Firecoin Technology. The found...

Blockchain

The exchange's big melee is coming soon, new assets, new flows, new mechanisms, which one is the magic weapon?

The first half of 2019 is definitely the most lively six months in the history of digital currency. This kind of exci...