当前位置:网站首页>The magical zero knowledge proof can not only keep secrets, but also make others believe you!
The magical zero knowledge proof can not only keep secrets, but also make others believe you!
2022-06-29 00:01:00 【Ma Nong turns over】
Someone claimed that he had solved the Goldbach conjecture , But I am afraid that others will copy , Do not expose details , How can we convince everyone that he has proved Goldbach's conjecture without releasing the details ?
It seems impossible , But there is a way , be called “ Proof of zero knowledge ”, To solve the problem of trust .
The definition of zero knowledge proof is : Certifier (prover) Be able to do this without telling the verifier (verifier) Provide any useful information , Make the verifier (verifier) Believe that an assertion is correct .
Define dry , It's so boring , Take two examples to digest ( See the link at the end of the article for the source of the example ).
1
If you have such a picture in your hand , There are hundreds of penguins inside :

however , among There is a sea parrot that looks like a Penguin :

You know this sea parrot is hiding somewhere else , But you don't want to tell people where they are .
So here comes the question : How can you without revealing the exact location , Prove to others that you do know the location of the sea parrot ?
A very simple way is , You take a board , Leave a hole in it , Put the picture behind the board , And let the sea parrot aim at the hole .

So when people look through the hole , He'll see the sea parrot .

But the point is : You didn't reveal the location of the sea parrot , Others know that there is a sea parrot in the picture .
This is zero knowledge proof .
2
The above example is a little simple , Let's watch a more complicated Sudoku game .
Sudoku rules are very simple , Players need to 9×9 Known on the disk Prompt number , Infer the number of all remaining spaces , And meet every line 、 Each column 、 Every thick line Palace (3*3) All numbers in 1~9, No repetition .

Suppose zhangdapang and hexiaohe both like to play Sudoku , They often ask each other Sudoku puzzles to test each other .
one day , Zhangdafan gives hexiaohe a Sudoku puzzle , Hexiaohe couldn't do it , So he found zhangdafang .
Hexiaohe : Fat brother , Did you cheat , A Sudoku without solution ?
Da Pang Zhang : ha-ha , It's your level , This Sudoku has a solution .
Hexiaohe : I don't believe it , Tell me the answer .
Da Pang Zhang : I won't tell you the answer , But I will prove with zero knowledge that I do know the answer .
How does zhangdafun prove it with zero knowledge ?
He asked hexiaoheng to turn around , Then I made 9981 cards , The card says 1~9, Put it on the table in the right way .
For those prompt numbers , He put the card number up , For places that need to be filled in , He put the card number down , Let hexiaohe not see the correct answer .

Hexiaohe turned around , He was disappointed to find , Zhangdachun didn't give him the answer .
Da Pang Zhang : The answer is on the table , You can check if it is correct , It can be in the form of lines 、 In columns , Or with 3*3 Block mode .
Hexiaohe chose to use the line .
Zhangdafun put each row of cards into an opaque bag , Shake... Shake , Ensure complete mixing , Then give it to hexiaohe .

Hexiaoheng opened each bag for inspection , Sure enough , The cards in each bag are 1~9 , Completely comply with Sudoku rules .

Hexiaohe : What can this prove ? I can also put 1~9 Put these lines , This will also happen .
Da Pang Zhang : But , I can't read my mind , I didn't know in advance that you had to choose the line method to verify ?
Hexiaohe asked for a retest , This time he chose column validation , Still right .
use 3*3 Square verification , Still can't find fault .
Hexiaohe thought : Is this boy lucky , You can guess my verification method every time , So as to put the appropriate number ? It's impossible ! that Zhangdachun does have a very high probability ( That's important ) Know the right answer !
In the process of verification , He didn't get any knowledge about the answer , Zhangdachun successfully implemented the zero knowledge proof .
3
There are many examples of zero knowledge proof , Such as Alibaba and the forty thieves 、 Map coloring verification 、 Color blind games and so on , If you are interested, you can search the Internet .
Zero knowledge proof is made up of S.Goldwasser、S.Micali And C.Rackoff stay 20 century 80 Put forward in the early s , It has a 30 For many years , What's the use of it ? We can imagine :
I want a loan , The bank requires monthly income 5000 above , But I don't want to disclose my salary , At this time, zero knowledge proof comes in handy .
For nuclear control 、 Non proliferation and nuclear disarmament , International inspection agencies need a way , It can confirm the authenticity of the nuclear weapon information submitted by a certain country , Without exposing sensitive information about nuclear facilities , It is just the place where zero knowledge proof can be used .
In the security field and blockchain , Zero knowledge proof has been applied :
Than me ( Liu Xin ) There is a public key and a private key , You got my public key safely , But never met me , One day we met .
I said, : I am Liu Xin
You may not believe it , What if someone pretends ?
I can generate a random string , Encrypt with my private key , And send it to you .
You decrypt with public key , If you get the same string , You know I must be Liu Xin .
Every transaction on bitcoin is transparent , Who transferred how much money to whom is publicly available . however , Privacy coin realized by zero knowledge proof technology , for example Zcash You can achieve hidden transaction information , But at the same time, it can make the whole network verify the validity of transactions .
All in all , Zero knowledge proof for the first time The correctness of the proof is decoupled from the knowledge of the proof , This paradigm shift is a huge innovation , It expands the intellectual boundary of human beings .
Reference material :
1. Computer Scientist Explains One Concept in 5 Levels of Difficulty
https://www.youtube.com/watch?v=fOGdb1CTu5c
There are examples of penguin pictures . What is more interesting is that he spoke to the pupils separately 、 middle school student 、 College students' 、 Graduate student 、 Experts and other five levels of people talk about zero knowledge proof , very interesting , Strongly recommend .
2. The Incredible Machine
https://medium.com/qed-it/the-incredible-machine-4d1270d7363a
It not only tells the examples of Sudoku , A proof machine is also constructed , Those who are interested can have a deeper understanding of .
( End )
Click on the picture below , See more highlights
边栏推荐
- Is it reliable and safe to avoid five in case of stock trading account opening
- JVM底层又是如何实现synchronized的
- Summary of software testing cognition
- urllib. Parse parses the parameters in the URL connection
- 力扣(LeetCode)178. 分数排名(2022.06.27)
- [C Primer Plus Chapter II after class programming questions]
- Quartz explanation and use
- TypeScript --第三节:接口
- [buuctf.reverse] 131-135
- Three PWN questions
猜你喜欢

Stm32f407------- external interrupt

每日一练:删除有序数组中的重复项

【软件分析】软件分析、设计与建模迭代式详解

12. Détection d'objets Mask rcnn

The company has a new Post-00 test paper king. The old oilman said that he could not do it. He has been

Online yaml to JSON tool

stm32F407-------寄存器地址名称映射分析

stm32F407-------NVIC中断优先级管理
![[buuctf.reverse] 131-135](/img/c2/b8b06c8191af2c75bf4ad5c82feaea.png)
[buuctf.reverse] 131-135

随笔记:插入排序 --from wcc
随机推荐
Solve the problem of Chinese parsing by configparser
每日一题: 数组中数字出现的次数
入行数字IC验证后会做些什么?
Trois questions PWN
Stm32f407 ------- IO pin multiplexing mapping
Stm32f407----- capacitive touch button
stm32F407-------时钟系统(SystemInit时钟初始化、Systick滴答定时器)
[C Prime plus chapitre II Questions de programmation après la Classe]
TypeScript -- 第六节 泛型
Stm32f407-------- NVIC interrupt priority management
stm32F407-------通用定时器
Edge extraction based on Halcon learning [2] circles Hdev routine
Typescript-- section 4: Functions
Summary of software testing cognition
随笔记:定义setter和getter的三种方式
【LeetCode】21. 合并两个有序链表 - Go 语言题解
How to make two objects or arrays equal
三个pwn题
After eight years of testing and opening experience and interview with 28K company, hematemesis sorted out high-frequency interview questions and answers
Software testing tools: complete and precise




