<p>"<a href="http://pages.cs.wisc.edu/~mkowalcz/628.pdf" rel="nofollow noreferrer">How to explain zero-knowledge protocols to your children</a>" is a lucid and well-written example of what zero-knowledge proofs and protocols are. Using a fictional story of Ali Baba and a magical cave, the author explains the concept in plain, straightforward terms.</p>

CC BY-SA 4.0
2018-05-07T21:32:53.263Z
Hmmm. Actually, so does the wikipedia article you reference in the question.
Buffy
CC BY-SA 4.0
2021-02-03T20:29:25.333Z
Finding Waldo is an interesting game to teach Zero Knowledge Proofs.
Gokul Alex
CC BY-SA 4.0
2018-05-07T21:22:11.623Z
2018-05-07T21:22:11.623Z
Onorio Catenacci
<p>The best example I have encountered comes from <a href="https://mathoverflow.net/questions/22624/example-of-a-good-zero-knowledge-proof">mathoverflow.net</a>. Here it is for you convenience.</p>

<p>Imagine your friend is color-blind. You have two billiard balls; one is red, one is green, but they are otherwise identical. To your friend they seem completely identical, and he is skeptical that they are actually distinguishable. You want to prove to him (I say "him" as most color-blind people are male) that they are in fact differently-colored. On the other hand, you do not want him to learn which is red and which is green.</p>

<p>Here is the proof system. You give the two balls to your friend so that he is holding one in each hand. You can see the balls at this point, but you don't tell him which is which. Your friend then puts both hands behind his back. Next, he either switches the balls between his hands, or leaves them be, with probability 1/2 each. Finally, he brings them out from behind his back. You now have to "guess" whether or not he switched the balls.</p>

<p>By looking at their colors, you can of course say with certainty whether or not he switched them. On the other hand, if they were the same color and hence indistinguishable, there is no way you could guess correctly with probability higher than 1/2.</p>

<p>If you and your friend repeat this "proof" t times (for large t), your friend should become convinced that the balls are indeed differently colored; otherwise, the probability that you would have succeeded at identifying all the switch/non-switches is at most 2−t. Furthermore, the proof is "zero-knowledge" because your friend never learns which ball is green and which is red; indeed, he gains no knowledge about how to distinguish the balls.</p>

CC BY-SA 4.0
2018-05-09T18:46:58.910Z
2018-05-09T18:46:58.910Z
Panagiotis Grontas
<p>One of the trickier concepts that comes up in the realm of cryptography is the notion of zero-knowledge protocols (also referred to as <a href="https://en.wikipedia.org/wiki/Zero-knowledge_proof" rel="noreferrer">zero-knowledge proofs</a>).  This is a way to verify an end-user's identity without having to store a password or some other sort of proof of user identity on the server. As you can imagine this is a lot more secure because if a hacker hacks the server, there's no secret for them to discover about a given user.</p>

<p>How to explain this idea to students though? </p>

CC BY-SA 4.0
2018-05-07T22:10:58.477Z
The second example in the wikipedia article (two balls) is actually easier and also very convincing.
Buffy
<cryptography>
How Can I Explain The Concept Of Zero Knowledge Proofs To Students
# How Can I Explain The Concept Of Zero Knowledge Proofs To Students

(Asked by: username_0 on 2018-05-07)

One of the trickier concepts that comes up in the realm of cryptography is the notion of zero-knowledge protocols (also referred to as [zero-knowledge proofs](https://en.wikipedia.org/wiki/Zero-knowledge_proof)). This is a way to verify an end-user's identity without having to store a password or some other sort of proof of user identity on the server. As you can imagine this is a lot more secure because if a hacker hacks the server, there's no secret for them to discover about a given user.

How to explain this idea to students though?

**Tags:** cryptography

> **Comments:**
> **username_1**: The second example in the wikipedia article (two balls) is actually easier and also very convincing.  

---

## 2 answers

### Answer by username_3 on 2018-05-09. Score: 4

The best example I have encountered comes from [mathoverflow.net](https://mathoverflow.net/questions/22624/example-of-a-good-zero-knowledge-proof). Here it is for you convenience.

Imagine your friend is color-blind. You have two billiard balls; one is red, one is green, but they are otherwise identical. To your friend they seem completely identical, and he is skeptical that they are actually distinguishable. You want to prove to him (I say "him" as most color-blind people are male) that they are in fact differently-colored. On the other hand, you do not want him to learn which is red and which is green.

Here is the proof system. You give the two balls to your friend so that he is holding one in each hand. You can see the balls at this point, but you don't tell him which is which. Your friend then puts both hands behind his back. Next, he either switches the balls between his hands, or leaves them be, with probability 1/2 each. Finally, he brings them out from behind his back. You now have to "guess" whether or not he switched the balls.

By looking at their colors, you can of course say with certainty whether or not he switched them. On the other hand, if they were the same color and hence indistinguishable, there is no way you could guess correctly with probability higher than 1/2.

If you and your friend repeat this "proof" t times (for large t), your friend should become convinced that the balls are indeed differently colored; otherwise, the probability that you would have succeeded at identifying all the switch/non-switches is at most 2−t. Furthermore, the proof is "zero-knowledge" because your friend never learns which ball is green and which is red; indeed, he gains no knowledge about how to distinguish the balls.


---

### Answer by username_0 on 2018-05-07. Score: 0

"[How to explain zero-knowledge protocols to your children](http://pages.cs.wisc.edu/~mkowalcz/628.pdf)" is a lucid and well-written example of what zero-knowledge proofs and protocols are. Using a fictional story of Ali Baba and a magical cave, the author explains the concept in plain, straightforward terms.

> **Comments:**
> **username_1**: Hmmm. Actually, so does the wikipedia article you reference in the question.  
> **username_2**: Finding Waldo is an interesting game to teach Zero Knowledge Proofs.  

---

