Current location - Quotes Website - Personality signature - Zero-knowledge proof theory and its simple application
Zero-knowledge proof theory and its simple application
In the early 1980s, Goldwasser and others put forward the concept of zero-knowledge proof. In essence, zero-knowledge proof is an agreement. The so-called agreement is a series of steps taken by two or more participants to complete a specific task, including the following three characteristics:

The 1. protocol is an orderly process from beginning to end, and each step should be executed in turn. Subsequent steps cannot be performed until the previous step is completed.

2. An agreement needs at least two participants. A person can complete a task by performing a series of steps, but this does not constitute an agreement.

3. You must be able to complete the task by executing the agreement.

The proof of zero knowledge must include two aspects, one is the prover and the other is the verifier. calibration test

A graph proves to the verifier that an assertion is correct, or the verifier has some knowledge, but does not reveal any useful information to the verifier. At present, zero-knowledge proof has been widely used in cryptography, especially in authentication protocols and digital signatures, and a large number of excellent algorithms have been designed by using digital signatures.

Explain zero knowledge with a story about a cave. There is a secret in the cave. Those who know the spell can open the secret door between C and D. For others, both channels are dead ends. Peggy knows the secret of this cave. She wanted to prove it to Victor, but she didn't want to reveal the spell.

This is how she persuaded Victor:

(1) Victor stands at point A.

(2) Peggy went into the cave and arrived at point C or D. ..

(3) After Peggy disappears into the cave, Victor goes to point B. ..

(4) Victor shouted to Peggy, asking her to come out from the left channel or the right channel.

Peggy agreed, and if necessary, she would use a spell to open the secret door.

Peggy and Victor repeat steps (1) to (5) n times.

Suppose Victor has a camera that can record everything he sees. He recorded the scene of Peggy disappearing into the cave, the time when he called Peggy out of the place he chose, and the time when Peggy came out. He recorded all the n experiments. If he showed these records to Carol, would she believe that Peggy knew the spell to open the secret door? Definitely not. Without knowing the spell, what would happen if Peggy and Victor agreed in advance what Victor would shout? Peggy will definitely walk into the road that Victor let her out, and then she can walk out without knowing the spell every time Victor lets her out. Maybe they won't do that. Peggy walked into one of the tunnels, and Victor made an arbitrary request. If Victor is right, good. If he guesses wrong, they will delete the experiment from the video. In a word, Victor can get a record, which shows exactly the same sequence of events as actually proving that Peggy knows the spell.

This shows two things. First, Victor can't convince the third party of the validity of this proof; Secondly, it is proved that the protocol is zero-knowledge. When Peggy didn't know the spell, Victor obviously couldn't learn anything from the record. However, Victor can't learn anything from the actual proof, because he can't distinguish between real records and forged records-it must be zero knowledge. In other words, Peggy didn't reveal any secret knowledge in the process of proving to Victor, which is called zero knowledge.