ZKP from Scratch

Learning Zero Knowledge Proof as a Non-Technical Person from Scratch

Annalisa Caballero
4 min readMay 17, 2023

--

Learning Zero Knowledge Proof (ZKP) as a non-technical person from scratch can be a challenging task, especially if you don’t know the basic concepts of logic, math, and cryptography. However, it is not impossible.

ZKP is a way of proving something without revealing any information about it. To provide a brief overview, ZKP is an interactive proof system that uses a mathematically encrypted puzzle to verify something, without disclosing the actual knowledge or information that could compromise the secret. This is why it is called a “Zero Knowledge Proof,” as it allows you to prove the correctness of information without revealing the actual information itself using arithmetic.

In ZKP there are always two people involved: the Prover and the Verifier. The Prover aims to prove to the Verifier that a secret is true, without revealing any information that would give away the secret.

ZKP

Example

Imagine you have a friend named Paul who can't see the difference between the colors green and red (colorblind). You have a green ball and a red ball, but Paul sees them as the same color. How can you prove to Bob that you really have a green ball and a red ball without telling him which is which?

Here's how the proof works: You give the two balls to Paul, who hides them behind his back. Then, he brings one ball out and shows it to you. After that, he puts it back behind his back and randomly chooses to show you either the same ball or the other ball. He asks you, "Did I switch the ball?" This process is repeated as many times as needed.

By looking at the colors of the balls, you can confidently say if he switched them or not. But if the balls were the same color and impossible to tell apart, you couldn't guess correctly more than half the time.

If you and your friend repeat this proof many times, your friend should become convinced that the balls are actually different colors.

ZKP Colorblind Example

This proof is called "zero-knowledge" because your friend never learns which ball is green and which is red. He gains no knowledge about how to tell them apart.

You can watch this video to learn more:

Zero Knowledge Proof Colorblind Example

ZKP’s Use Cases

1. Authentication: ZKPs can be used to authenticate and verify the identity of individuals or devices without requiring them to reveal personal information. For example, a user could prove that they are over 18 without revealing their date of birth or ID number.

2. Data Privacy: ZKPs can be used to verify that certain data meets certain criteria without revealing the actual data itself. This could be particularly useful in industries that handle sensitive data, such as healthcare or finance.

3. Scaling Blockchains: ZKPs can be used for scaling blockchains by doing ZKP Rollups. ZK Rollups address this challenge by compiling multiple transactions together off-chain and submitting a single proof, known as a validity proof, to the main blockchain.

The cons

1. Complexity: Zero knowledge proofs are a complex cryptographic technology that requires significant expertise to implement and maintain. This complexity makes it harder to verify the correctness of the proofs and can be a barrier to adoption.

2. Efficiency: The computational requirements for generating and verifying a zk-proof can be very high, which can make it difficult to scale the technology to support large-scale applications.

3. Limited functionality: Zk-proofs can only prove the existence of certain facts, such as the validity of a statement, without revealing any additional information. This can limit their utility in applications where other types of proofs are required, such as proving the ownership of an asset.

Conclusion

In conclusion, the main problem people face is a lack of trust among each other. However, Zero-Knowledge Proof (ZKP) applications provide a way to verify the truth without revealing sensitive information. This has significant implications, including preventing copyright infringements, protecting user data, ensuring fair elections, scaling blockchains, and even facilitating the disarmament of nuclear weapons.

Therefore, even as a non-technical individual, it is crucial to recognize the importance of learning about and embracing this technology.

Bibliography

“Computer Scientist Explains One Concept in 5 Levels of Difficulty” Publisher: WIRED Date Uploaded: January 18, 2022 URL: https://www.youtube.com/watch?v=fOGdb1CTu5c

“Zero Knowledge Proof — ZKP” Publisher: Simply Explained Date Uploaded: January 14, 2019 URL: https://www.youtube.com/watch?v=OcmvMs4AMbM

Micali, Silvio. “The Knowledge of Complexity.” Proceedings of the 27th Annual ACM Symposium on Theory of Computing, ACM, 1995, pp. 439–448.

--

--

Annalisa Caballero

Founder of Crypto Mujeres DAO2B, Growth Marketing Specialist, Social Media, Community Management Expert, Content Creator, & Web3 enthusiast.