- Crypto for dummies
- Posts
- Zero-Knowledge Proofs
Zero-Knowledge Proofs
A normie's guide to this futuristic technology that proves you're the only one who has access to your data
There's a war brewing between people & companies over your data. But it turns out that there's a magic weapon that destroys all the risk:
Zero-knowledge Proofs
A zero-knowledge proof (zk proof) is a cryptographic proof that allows someone to prove that they possess specific information without revealing that information! Yes, you heard that right. Let’s look at an example to understand how zk proofs work:
Imagine this scenario: Payal and Vikas are huge fans of the show Game of Thrones. They are eagerly awaiting the release of its prequel: House of the Dragons. One month before the premiere, Payal tells Vikas that she has a secret.
She hacked into the HBO Max website and downloaded all the unreleased episodes of HOTD. However, she cannot show the episodes to Vikas because she fears the news (and spoilers) will spread and she will be canceled by society for her actions.
So, how can Payal convince Vikas that she really has access to the HOTD episodes without getting canceled?
Payal decides to share screenshots of dragons - flying & setting things on fire - from those episodes with Vikas.
Because Vikas is a die-hard GOT fan, he can quickly verify that all these dragons are new (from HOTD) and did not appear in any of the GOT episodes. Also, since the screenshots don't show anything other than the dragons, they reveal zero spoilers about the show to Vikas.
In other words, Payal is able to provide a zero-knowledge proof (of access to HOTD episodes) to Vikas
Characteristics of Zero-Knowledge Proofs
zk-proofs have 3 essential properties:
Completeness: An honest prover will always be able to convince the verifier of their knowledge. In our example, if Payal is honest & actually has access, she will always be able to convince Vikas of that access.
Soundness: A dishonest prover will never be able to convince the verifier of their (false) claim of knowledge. In our example, if Payal is lying and doesn't actually have access to the episodes, she will never be able to convince Vikas otherwise.
Zero-Knowledge: The verifier learns no information about the secret other than the fact that the prover actually possesses it.In the example, Vikas gains zero additional knowledge about the episodes from the screenshots other than the fact that Payal has access to them.
Although zk proofs might sound simple, it took years for researchers and scientists to come up with the algorithms to create practical zk proofs.
They are a major breakthrough enabling privacy in various areas which wouldn't be possible otherwise. Here are some examples:
Proving your credit score is above a certain number without sharing the exact score
Proving your ETH balance is above a certain amount without sharing the exact balance
Proving your identity without sharing personal details like address, phone number, etc
Zero-knowledge proofs are being developed at a breakneck pace, with several advancements in 2022 itself.