SlideShare a Scribd company logo
CSCI 3130: Formal languages and automata theory
Andrej Bogdanov
http://www.cse.cuhk.edu.hk/~andrejb/csc3130
The Chinese University of Hong Kong
Interaction, randomness,
and zero-knowledge
Fall 2011
Iteration ,randomness, and Zero-knowledge
Authentication
What happens when you type in your password?
Naïve authentication
• The server knows your password
• So they can impersonate you at other web sites
where you use the same password
login: chief
password: 123456
OK
you server
acme.com
“Zero-knowledge” authentication
acme.com
Can you convince the server that you know your
password, without saying it?
I know the password
Can you prove it?
What is knowledge?
• Example 1: Tomorrow’s lottery numbers
What is ignorance?
(lack of knowledge)
2 31 12 7 28 11
We are ignorant of them because they are random
What is ignorance?
• Example 2: A difficult homework problem
Problem 4
(a) Show that P ≠ NP.
(If you collect $1,000,000, give it to your CSCI 3130 instructor.)
We are ignorant because it takes a lot of work to
figure out the answer
Using ignorance to our advantage
acme.com
I know the password
Prove it!
You want to convince server you know the password,
but you don’t want to reveal the password itself
The server is convinced, but gains zero-knowledge!
but I don’t want to say it!
I can convince you he is in there,
without telling you where!
Zero-knowledge
• I can convince you that I know where he is
• But you have zero knowledge about how to find him!
A protocol for non-color-blindness
• You want to convince me you are not color-blind
I pull at random either a red ball
or a blue ball and show it to you
You say red or blue
We repeat this 10 times
If you got all the answers right,
I am convinced you know red from blue
Interaction and knowledge
• What knowledge did I gain from this interaction?
I learned that you can tell red from blue
But I also learned the colors of the balls
in each glass
Suppose I was color-blind
Then I used you to gain some knowledge!
A different protocol
box 1
box 2
I pull at random either a red ball
or a blue ball and show it to you
Each time, you say “same color as previous”
or “different color from previous”
We repeat 10 times
If you got all the answers right,
I am convinced you know red from blue
But I did not gain any other knowledge!
Zero-knowledge
• Suppose I am color-blind but you are not
• In the first experiment, I cannot predict your answer
ahead of time
• In the second one, I know what you will say, so I do
not gain knowledge when you say it
Zero-knowledge proofs
acme.com
Oded Goldreich Silvio Micali Avi Wigderson
grrrrr!
Graph coloring
Task: Assign one of 3 colors to
the nodes so that every edge
has different endpoints
3COL = {G: G has a valid 3-coloring}
3COL is NP-complete
GMW protocol: Choosing a password
acme.com
registration
donald
tsang
chief@gmail.com
chief@gmail.com
your password will be a
random string of colors
= { , , }
GMW protocol: Commitment phase
• Instead of sending the password to the server, you:
1 2 3 4 5 6
Construct a graph with vertices
colored as in password
Put some (random) edges between
vertices of different colors
Delete the colors of the vertices
G
donald
tsang
chief@gmail.com
chief@gmail.com
1
2
3 4
5
6
1
2
3 4
5
6
GMW protocol: Commitment phase
• Your real password is the coloring, which you hide
from the server
• You give the server a graph G that you know how to
color, but the server doesn’t
• Since 3COL is hard, the server shouldn’t be able to
figure out your coloring (password) from G
GMW protocol: Login phase
Randomly permute the colors
Lock each of the colors in a box
The server picks a random edge
and asks for the keys to boxes
You send the requested keys
The server unlocks the two boxes
and checks the colors are different
Repeat 100 times. Login
succeeds if colors always different
1
2
3 4
5
6
email
password
chief@gmail.com
1 2 3 4 5 6
Send the locked boxes to server
✔
GMW protocol: Security
• Why can’t an impostor log in instead of you?
1
2
3 4
5
6
An impostor does not know how
to color the graph
Some edge will be colored improperly
When the server asks to see this edge,
impostor will be detected
hello, I am
✘
GMW protocol: Zero-knowledge
• Why doesn’t the server learn your password?
1
2
3 4
5
6 When you send the password, the
server can only see some locked boxes
The server then asks you to unlock
some boxes
Colors in the password were shuffled, so
server will only see two random colors!
But how do you send boxes and keys
over the internet?
Iteration ,randomness, and Zero-knowledge

More Related Content

PPT
CSS 332 : Algorithms - greedy Algorithms
PPT
CS 332 : Algorithms - Concept of NP Completeness
PPT
NFAs which recognize regularl languages.
PDF
Python: Strings & Intro Programming PDFs
PDF
Python: Strings & Intro Programming PDFs
PPTX
Pivot Tables summarize complex datasets.
PPTX
Excel Macros automate tasks you do often.
PDF
2024 Trend Updates: What Really Works In SEO & Content Marketing
CSS 332 : Algorithms - greedy Algorithms
CS 332 : Algorithms - Concept of NP Completeness
NFAs which recognize regularl languages.
Python: Strings & Intro Programming PDFs
Python: Strings & Intro Programming PDFs
Pivot Tables summarize complex datasets.
Excel Macros automate tasks you do often.
2024 Trend Updates: What Really Works In SEO & Content Marketing

Recently uploaded (20)

PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
737-MAX_SRG.pdf student reference guides
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Safety Seminar civil to be ensured for safe working.
PPT
Project quality management in manufacturing
PDF
Well-logging-methods_new................
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Sustainable Sites - Green Building Construction
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PPT
introduction to datamining and warehousing
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Geodesy 1.pptx...............................................
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
R24 SURVEYING LAB MANUAL for civil enggi
737-MAX_SRG.pdf student reference guides
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Safety Seminar civil to be ensured for safe working.
Project quality management in manufacturing
Well-logging-methods_new................
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Mechanical Engineering MATERIALS Selection
Internet of Things (IOT) - A guide to understanding
UNIT 4 Total Quality Management .pptx
Sustainable Sites - Green Building Construction
III.4.1.2_The_Space_Environment.p pdffdf
introduction to datamining and warehousing
Embodied AI: Ushering in the Next Era of Intelligent Systems
CYBER-CRIMES AND SECURITY A guide to understanding
Geodesy 1.pptx...............................................
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
Ad
Ad

Iteration ,randomness, and Zero-knowledge

  • 1. CSCI 3130: Formal languages and automata theory Andrej Bogdanov http://www.cse.cuhk.edu.hk/~andrejb/csc3130 The Chinese University of Hong Kong Interaction, randomness, and zero-knowledge Fall 2011
  • 3. Authentication What happens when you type in your password?
  • 4. Naïve authentication • The server knows your password • So they can impersonate you at other web sites where you use the same password login: chief password: 123456 OK you server acme.com
  • 5. “Zero-knowledge” authentication acme.com Can you convince the server that you know your password, without saying it? I know the password Can you prove it?
  • 6. What is knowledge? • Example 1: Tomorrow’s lottery numbers What is ignorance? (lack of knowledge) 2 31 12 7 28 11 We are ignorant of them because they are random
  • 7. What is ignorance? • Example 2: A difficult homework problem Problem 4 (a) Show that P ≠ NP. (If you collect $1,000,000, give it to your CSCI 3130 instructor.) We are ignorant because it takes a lot of work to figure out the answer
  • 8. Using ignorance to our advantage acme.com I know the password Prove it! You want to convince server you know the password, but you don’t want to reveal the password itself The server is convinced, but gains zero-knowledge! but I don’t want to say it!
  • 9. I can convince you he is in there, without telling you where!
  • 10. Zero-knowledge • I can convince you that I know where he is • But you have zero knowledge about how to find him!
  • 11. A protocol for non-color-blindness • You want to convince me you are not color-blind I pull at random either a red ball or a blue ball and show it to you You say red or blue We repeat this 10 times If you got all the answers right, I am convinced you know red from blue
  • 12. Interaction and knowledge • What knowledge did I gain from this interaction? I learned that you can tell red from blue But I also learned the colors of the balls in each glass Suppose I was color-blind Then I used you to gain some knowledge!
  • 13. A different protocol box 1 box 2 I pull at random either a red ball or a blue ball and show it to you Each time, you say “same color as previous” or “different color from previous” We repeat 10 times If you got all the answers right, I am convinced you know red from blue But I did not gain any other knowledge!
  • 14. Zero-knowledge • Suppose I am color-blind but you are not • In the first experiment, I cannot predict your answer ahead of time • In the second one, I know what you will say, so I do not gain knowledge when you say it
  • 15. Zero-knowledge proofs acme.com Oded Goldreich Silvio Micali Avi Wigderson grrrrr!
  • 16. Graph coloring Task: Assign one of 3 colors to the nodes so that every edge has different endpoints 3COL = {G: G has a valid 3-coloring} 3COL is NP-complete
  • 17. GMW protocol: Choosing a password acme.com registration donald tsang [email protected] [email protected] your password will be a random string of colors = { , , }
  • 18. GMW protocol: Commitment phase • Instead of sending the password to the server, you: 1 2 3 4 5 6 Construct a graph with vertices colored as in password Put some (random) edges between vertices of different colors Delete the colors of the vertices G donald tsang [email protected] [email protected] 1 2 3 4 5 6 1 2 3 4 5 6
  • 19. GMW protocol: Commitment phase • Your real password is the coloring, which you hide from the server • You give the server a graph G that you know how to color, but the server doesn’t • Since 3COL is hard, the server shouldn’t be able to figure out your coloring (password) from G
  • 20. GMW protocol: Login phase Randomly permute the colors Lock each of the colors in a box The server picks a random edge and asks for the keys to boxes You send the requested keys The server unlocks the two boxes and checks the colors are different Repeat 100 times. Login succeeds if colors always different 1 2 3 4 5 6 email password [email protected] 1 2 3 4 5 6 Send the locked boxes to server ✔
  • 21. GMW protocol: Security • Why can’t an impostor log in instead of you? 1 2 3 4 5 6 An impostor does not know how to color the graph Some edge will be colored improperly When the server asks to see this edge, impostor will be detected hello, I am ✘
  • 22. GMW protocol: Zero-knowledge • Why doesn’t the server learn your password? 1 2 3 4 5 6 When you send the password, the server can only see some locked boxes The server then asks you to unlock some boxes Colors in the password were shuffled, so server will only see two random colors!
  • 23. But how do you send boxes and keys over the internet?