Zero-Knowledge Proofs (ZKPs) For The Absolute Beginner

Zero-Knowledge Proofs (ZKPs) For The Absolute Beginner

Zero Knowledge Proofs (ZKPs) are a powerful tool in the world of cryptography that allows for secure and private... Stop...

Let's start again, shall we?

Imagine a scenario where I (Dolapo) need to send a secure email to a coworker (Stella) on the opposite side of the office building.

For the sake of this explanation, let's call me the "prover", and Stella the "verifier".

When I send this email to Stella, I also want to prove that I was the one behind the keyboard, and not someone else. Because in this scenario, Stella has no way of knowing if I sent the mail or not.

A great fix for this might be for Stella and me to choose a password we can always include in our messages (say pineapple). That way, if Stella sees the word "pineapple" in the mail, she automatically knows I sent the message.

There's a big problem with this setup though. At first glance, the password solution might work. However, what if another co-worker peeked over Stella's shoulder one day and saw the password?

He'd know it too, and we'd be back at square one. There would be nothing stopping him from writing a nasty message, pretending to be me to Stella, who in fact, was my girlfriend.

Do you see the problem with plain passwords? How do we fix this?

Suppose there was a way to send messages using the same password method, but in such a way that no visible passwords are involved.

In this series of articles, we'll take a deep dive into the basics of Zero Knowledge Proofs and how important they are in the world of blockchain technology.

What is a Zero Knowledge Proof?

A Zero Knowledge Proof is a type of proof or argument that allows one party (the prover) to demonstrate to another party (the verifier) that a particular statement is true, without revealing any additional information beyond the truth of the statement itself.

In other words, a zero-knowledge proof allows the prover to prove that they know a secret, without revealing the secret itself.

Consider the previous example involving me and a coworker, who is secretly my girlfriend.

What if instead of adding a plain password to my messages and leaving it open for anyone to steal, Stella and I agreed on a special algorithm for hashing (or scrambling) messages?

To prove to Stella that I know the password, I could ask her to choose a random word and send it to me.

I would take this random string she sends, combine it with the password, and scramble both with the hashing algorithm before sending it to her.

I can send this new hashed value to her along with my message, where she does the same thing I did on her end: She combines the agreed-upon password with the random word she chose earlier and then hashes it.

If the value she gets from this hash matches the one I sent, she immediately knows that I knew the password, and she can conclude that the message sent alongside the hash is authentic.

it is important to keep in mind that in reality, Zero Knowledge Proofs are much more complex and involve sophisticated mathematical algorithms and cryptography

The importance of Zero Knowledge Proofs

Zero Knowledge Proofs have significant implications for the world of cryptography and security. They allow for secure and private verification of information without revealing any sensitive information.

This has applications in a wide range of fields, including authentication, data sharing, and privacy-preserving systems.

In the context of blockchain technology, Zero Knowledge Proofs are used to enable privacy-preserving transactions and smart contracts. By using Zero Knowledge Proofs, users can execute transactions on blockchain networks like Ethereum, without revealing the details of those transactions to the public.

This allows for greater privacy and security, and enables the development of decentralized applications that require privacy-preserving functionality.

Types of Zero Knowledge Proofs

There are several types of Zero Knowledge Proofs, each with its own strengths and weaknesses. Some of them include three of the most common types of Zero Knowledge Proofs: zk-SNARKs, zk-STARKs, and Bulletproofs.

zk-SNARKs

zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) are the most well-known type of Zero Knowledge Proof.

They are used to verify the correctness of a computation without revealing any details about the computation itself. zk-SNARKs are used in the Zcash cryptocurrency to enable privacy-preserving transactions.

zk-SNARKs work by generating a proof that a computation was performed correctly, without revealing the inputs or outputs of the computation.

This proof can be verified by anyone without knowledge of the inputs or outputs of the computation.

This allows for private transactions to be executed on the Ethereum network, without revealing the details of those transactions to the public.

zk-STARKs

zk-STARKs (Zero-Knowledge Scalable Transparent Argument of Knowledge) are a newer type of Zero Knowledge Proof that have several advantages over zk-SNARKs.

Unlike zk-SNARKs, zk-STARKs do not require a trusted setup, which means that they can be used more securely in a decentralized setting.

zk-STARKs are used to verify the correctness of a computation, without revealing any details about the computation itself.

They are also more scalable than zk-SNARKs, which means that they can be used to verify more complex computations.

Bulletproofs

Bulletproofs are a type of Zero Knowledge Proof that are used to verify the correctness of range proofs.

Range proofs are used to verify that a particular value falls within a certain range, without revealing the actual value itself. Bulletproofs are used in the Monero cryptocurrency to enable privacy-preserving transactions.

Bulletproofs work by generating a proof that a value falls within a certain range, without revealing the actual value itself.

This proof can be verified by anyone without knowledge of the actual value, which allows for private transactions to be executed on the Ethereum network.

In Conclusion

Zero Knowledge Proofs are a powerful tool in the world of cryptography that allow for secure and private verification of information without revealing any sensitive information.

In the Ethereum network, Zero Knowledge Proofs are used to enable privacy-preserving transactions and smart contracts. There are several types of Zero Knowledge Proofs, each with its own strengths and weaknesses.

zk-SNARKs, zk-STARKs, and Bulletproofs are three of the most common types of Zero Knowledge Proofs, and are used in different contexts within the Ethereum network.