Karthik's Crypto Takes

Share this post

#31 Zero Knowledge

learnhax.substack.com

#31 Zero Knowledge

Do you have zero knowledge about zero knowledge proofs? Let's fix that..

Karthik Senthil
Aug 8, 2022
4
Share this post

#31 Zero Knowledge

learnhax.substack.com

1 Take šŸŒ¶ļø

Five years from now, zero knowledge technology will be utilized by a majority of people in the world via the applications they use on a regular basis.

In crypto world, it’s officially zero knowledge (or ZK) summer! Every VC is tweeting about it, every founder references it in their product vision, and every ZK cryptographer has been invited to the Met Gala. Ok, I’m kidding about one of these. But if you’re anything like me, the term ā€œzero knowledgeā€ made it feel that you need a PhD to understand it. Well good news: you don’t. Better news: I deep dove into it so you don’t have to. Today, we’ll cover:

  • How zero-knowledge proofs (ZKPs) work

  • What do ZKPs power today

  • What might ZKPs enable in the future

What are ZKPs and how do they work?
In a sentence, zero knowledge proofs allow you to prove something is true without actually knowing its true. If that sounds too sci-fi for you — don’t worry, we’ll break it down with a simple example.

Zach Galifianakis numbers - Caption | Meme Generator
People who actually understand zero knowledge proofs (jk!)

Ok, imagine there’s an underground tunnel with two ways to get in or out (A & B). Inside the tunnel, there’s a door that requires a key to open — if you enter in entrance B, you need the key to come out of entrance A, and vice versa. If you wanted to prove a person (let’s call him Xavier) has the key, normally you’d ask Xavier to show you the key, or have him go in one of the entrances and walk out the other. But if you think about it, it’s actually kinda inefficient:

  • Xavier likely has to reveal more about himself than whether or not he has the key, whether it’s the physical appearance of the key or revealing who he is by showing up to demonstrate he can go in one entrance and out the other.

  • Xavier has to repeat this with every single person who wanted to verify the same thing, or we’d have to invent a 3rd party who verifies this that everyone would have to trust

ZKPs eliminate all that by making it mathematically verifiable if Xavier has the key. How? After Xavier goes into the tunnel, a software program randomly selects whether he should come out of Entrance A or B (without knowing or caring which entrance he went in), and logs it. Now if the program only does this one time, there’s a 50% chance Xavier doesn’t have the key but got lucky that the program picked the same entrance he went in. However, if we run this simulation hundreds (or thousands) of times, it becomes mathematically certain if Xavier has the key or not based on if he’s able to come out of the entrance the program selects. The best part? Anyone can access the results of this simulation in a ā€œtrustlessā€ way while maximizing Xavier’s privacy.

What do ZKPs power today?
ZKPs primarily power two things within crypto:

  • Privacy - As cool as they are, blockchains make all transaction data publicly available. As a user, you may not want everyone to see what you’ve been spending your $$ on. As referenced in our example above, ZKPs preserve privacy in a really unique way. Tools like Aztec allow users to ā€œshieldā€ their transactions via ZKPs so that no one can tell what they are doing while maintaining that they aren’t doing anything sneaky like double-spending $$ (to learn more, highly recommend reading this piece from friend of the newsletter, Jon Wu, who works on the growth team at Aztec).

  • Rollups - As you may have experienced, gas fees (cost to make a transaction) on ETH are expensive! Rollups are a performance enhancement that enable users to submit their transaction to an offline Layer 2 (L2) chain, which then aggregates (or ā€œrolls upā€) a bunch of transactions and submits them as a single transaction on ETH. While this saves gas fees, the main ETH chain still has to validate each individual transaction to validate everything is kosher. However, using ZKPs for rollups means that ETH can quickly verify the proof without having to manually validate each transaction, which improves performance + cost by an order of a magnitude.

What might ZKPs enable in the future?
We’re just scratching the surface with what ZKPs can enable, but here are a few areas to keep your eye on:

  • Identity Management - If you think about anything that requires identification, whether it’s getting into a bar or logging into a website, you’re often showing a lot more information that you need to (e.g. physical or email address, name, etc). What if there was a way to securely identify you in a better way that doesn’t require trust of a institution or 3rd party? (Polygon ID is building something interesting here)

  • Financial Asset Checks - If you’ve ever tried to rent or buy a house, the amount of financial data you need to share is insane (you literally have to send in the last 3-4 months of your bank account statements). All this unneeded data is why data leaks or hacks can be so worrisome. ZKPs can enable tools to reliably prove that you have a certain amount of $$ in your bank account.

  • Regulatory/Privacy Implementations - To better satisfy regulatory/privacy requirements like GPDR, companies could use ZK technology in their products to minimize the amount of data they need to collect/persist on their users.

Recent hardware, software, and blockchain advancements have fortuitously converged to transform ZK technology from a theoretical topic to actually be used in real-life applications. Who knows what the future holds, but technologies like ZK make me optimistic it’ll be a better one!

Thanks for reading Karthik's Crypto Takes!
Subscribe for free to receive new posts and support my work.

2 Things To Check Out šŸ¤”Ā 

1. The true power & potential of crypto:

Twitter avatar for @santiagoroel
Santiago R Santos | #9159 šŸ’šŸ¤– @santiagoroel
When all is said & done, folks will look back & see this as generational opportunity to be part of most exciting socioeconomic transformation of our generation: crypto. Where no one cares where u come from, what u look like, where u went to school, simply if u have great ideas
2:25 AM āˆ™ Aug 6, 2022
346Likes42Retweets

2. šŸ˜‚

Twitter avatar for @Biedersam
Sam Biederman @Biedersam
Opening an Indian restaurant in the Hamptons called Saag Harbor
6:52 PM āˆ™ Aug 5, 2022
2,001Likes48Retweets

Always be learning,
Karthik

Share this post

#31 Zero Knowledge

learnhax.substack.com
Comments
TopNewCommunity

No posts

Ready for more?

Ā© 2023 KS
Privacy āˆ™ Terms āˆ™ Collection notice
Start WritingGet the app
SubstackĀ is the home for great writing