**Today, let's explain the zero-knowledge proof with Halloween candy.**

**Zero knowledge proof**

**Zero-knowledge proof (also known as zero-knowledge proof, ZKP)** **is a method of authenticating without exchanging passwords,** in which case the password cannot be stolen. This is a very cool thing, because it keeps your communication safe and no one can get your communication content or files you share with others.

- Winners such as Tencent, Fidelity and Lotte, Everledger finally won $20 million in Series A financing
- Zhu Jiaming: Blockchain is likely to bring a "paradigm revolution" in the scientific field
- Investment management company VanEck: Bitcoin is a great tool for diversifying your portfolio
- Economic Daily: Blockchain, down-to-earth to a bright future
- Coinbase opens "crazy coin mode", 17 new coins such as polkadot and filecoin are included in the list
- How should the blockchain play? We talked to the Nobel Laureate in Economics

With ZKP, you can prove that you know the secrets of the "other end" person without leaking anything. The term “zero knowledge” is derived from the fact that the first party (known as the “certifying party”) does not disclose information about the secret (“zero knowledge”), but the second party (called “verifying party”) Be sure that the first party knows the secrets involved in the problem.

**Why do you have to prove that you know the secret without telling the secret?** **When you don't trust others, but still need to convince them that you know the secret, you have to prove that you are informed without revealing the secret content.** **So how is this achieved?**

**Chocolate bars and millionaires**

Let's take a look at the chocolate bars that Bob and Alice got on Halloween.

In order to compare the chocolates of the two people without telling the specific amount, Bob took four boxes with locks and put labels on each box, which read 10, 20, 30 40 (chocolate bars).

Then Bob leaves only the key to the box with the amount of chocolate he owns (assuming he has 20 chocolate bars), throws away the keys of all other boxes and leaves the room.

Alice took four sheets of paper, one of which had "+" on it and the other three had "-" on it.

Then she puts all the paper with the "+" (through the gap in the box) into the box corresponding to the number of chocolate bars (assuming she has 30 chocolate bars). Put the paper with "-" in the other 3 boxes and leave the room.

Bob returns to the room and uses his own key to open the box corresponding to the number of chocolate bars he has. Check whether the paper in the box is "+" or "-".

If Bob finds a "+" on the paper in the box, then Alice has the same amount of chocolate as he does. If it is "-", it means that they have different amounts of chocolate (but they still don't share the amount of chocolate they own).

We know that Bob has 20 chocolate bars in his bag and Alice has 30 chocolate bars in his bag. By opening the box and finding the paper with the "-" written, Bob learned that he and Alice had different amounts of chocolate. But he doesn't know if Alice has more chocolate than herself or herself.

When Alice returns to the room, she will see that the paper in Bob's hand is "-", and it is known that Bob has a different number of chocolates than himself. **But Bob and Alice still don't know how many chocolate bars they have. They only know that the amount of chocolate they have is different.**

The same example, but in a slightly different form, is widely known as "Yao's Millionaire's Problem Yao's Millionaire Problem." **Two millionaires want to know if they have the same amount of money, but they don't want to reveal specific values.** **This is a simple example of how ZKP works.**

Is it very simple and clear? With this explanation, the 5-year-old child can easily understand the meaning of “zero knowledge proof”! What cryptographic explanations do you want to know about zero-knowledge protocols? You can leave a message to tell us, or discuss with us in the message area how you explain other cryptography. ~ *Source | Hackernoon*

*Translator | Fire Sauce*

*Produced | Blockchain Base Camp (blockchain_camp)*