# About ZK-Proofs

By [Danki](https://paragraph.com/@danki) · 2023-04-18

---

I’ve been avoiding to write about ZK-Proofs for the longest time because I don’t like giving that kindergarten “Where’s Waldo” explanation that’s already been repeated [a](https://medium.com/swlh/a-zero-knowledge-proof-for-wheres-wally-930c21e55399)[thousand](https://blog.goodaudience.com/understanding-zero-knowledge-proofs-through-simple-examples-df673f796d99)[times](https://www.circularise.com/blogs/zero-knowledge-proofs-explained-in-3-examples) over on the internet. Danki didn’t write this blog for children. I wrote it to find smart and curious frens who are interested to go beyond surface-level knowledge.

But fine, let’s get this over with so you don’t have to google anymore:

How does someone prove that Waldo iz in this picture without revealing where he is?

![photo by 0xSage, one of my favorite blockchain security figures](https://storage.googleapis.com/papyrus_images/1ba19888a680f0c8a2f3745972a22222ea2b2070a8140bf1fccdc19c5a8fa705.png)

photo by 0xSage, one of my favorite blockchain security figures

Here’s how:

![photo by 0xSage](https://storage.googleapis.com/papyrus_images/dae0ee0125bc7d5c921cd6a2e116479a5df393c66310d646e512eb0cdf10cadb.png)

photo by 0xSage

There… your classic analogy of ZK-Proofs. As you can see, the system allows for Alice to prove to Bob that Waldo is there without revealing his location.

And this ability to verify an information without actually revealing to the verifier what the information is, is the kind of mechanism dat is giving me wet dreams.

Privacy on the Blockchain
-------------------------

The thing that makes blockchain technology so good is its complete transparency. Dis is why people in it are able to transact with confidence. We all know that everything is verifiable because the accounting is put out in public, in realtime. But this comes at a very high cost and that is everybody’s privacy.

Come to think of this. The ledger shows how much you have, how you spend, the digital assets you own, and when and where you’re sending your crypto. And if that’s not too much information, some smart contracts emit events for indexing the details of your interaction with their dApp. Now, imagine we’re having completely transparent decentralized apps that takes in your sensitive information like identity, votes, credit and banking data… that would be an evil crimelord’s dream!

Enter ZK-Proofs. Now we have a way to prove to these dApps that we have their requirements without revealing to the chain what they are. It makes the ledger auditable without publishing sensitive data to the blockchain.

That solves most of the privacy problems in the blockchain, ain’t it?

And dat, mah frens, is why you should pay attention to ZK.

Properties of a ZK Proof
------------------------

There are many kinds of ZK Proofs but they all have these properties in common:

1.  **Zero-Knowledge:** There should no other information revealed to the verifier aside from the statement being true
    
2.  **Soundness:** The system can’t be cheated. If the proof was guessed, then there’s a super high chance that the verifier can tell that the prover is being dishonest
    
3.  **Completeness:** The proofs can consistently prove a statement’s validity and are enough to statistically convince the verifier
    

As you would notice, there are two participants in this process: the prover and the verifier. In some ZK circuits, the prover and verifier has to interact several times to prove the validity of the statement. We call that _interactive zero-knowledge proofs_. But dat is not very efficient when we have a large set of statements to prove, right? So we also have what they call a _non-interactive zero-knowledge proof_ where it’s basically a one-player game because the verifier is replaced by a hash function instead. Yes it is much, much efficient but it poses security issues of its own. More on dat soon.

“But I still don’t get all these talks about ZK in the crypto space”
--------------------------------------------------------------------

Ah fren, you’re probably reading this post because you wanna understand all these buzz around the community. If we detail into every single one of them, it will take weeks. So I’m just going to make a good list of the latest talks and tell you how this relates to ZK-Proofs:

### ZK-Rollups

A ZK-Rollup is a layer-2 scaling solution. “Ugh, another one”, you might say. But it has a unique way where it bundles the transactions, processes them, but doesn’t post every single transaction to layer1. Instead they make a summary of the state changes and prove them to a base layer using a zero-knowledge proof mechanism. Once they’re proven, then the new state of the blockchain is deployed to layer1. The benefit is that it speeds up the transactions while still inheriting the security of the layer1.

### Self-Sovereign Identity

It’s a data-ownership model where your identity will not be stored in a centralized database. Instead you store it in your device or wallet and then only take it out for verification and transactions… or not. Because remember we have ZK? Now with zero-knowledge, you don’t even have to literally provide your ID to the authenticator. You only need a proof that you own your identity and that your ID is authentic. So your data remains private during the whole authentication process.

### Blockchain Voting

Putting the voting process in the blockchain has huge benefits, like complete and quick auditability, but how about ballot secrecy? You’ve guessed it, ZK allows for verifying your eligibility to vote without revealing any information about you. This is better and more secure than mere ballot encryption where the system knows who voted but keeps the vote private to the voter.

Danki Promise: Math Incoming
----------------------------

I still have so much to spit about this whole ZK story but I hope dis satisfied yer curiosity for now… But if not, we’ll have a bigger chonk next time by deepdiving into ZK Maths: the Polynomial Problem, Fiat-Shamir Transformation, Fast Reed-Solomon Interactive-Oracle Proofs (FRIs), and Rank 1 Constraint System (R1CS). Probably after 3 posts, we kan finally program a ZK Circuit haha! So buckle up, dis is gonna be a long journey😄

つづく

* * *

Anyway I’m giving out a free-to-mint nft for my first few subscribers. Catch it while u can mah frens:

[subscriber-edition://0x7674b264817b17BBCf6D983ee39391D4C851ED62?tokenId=0](subscriber-edition://0x7674b264817b17BBCf6D983ee39391D4C851ED62?tokenId=0)

---

*Originally published on [Danki](https://paragraph.com/@danki/about-zk-proofs)*
