SlideShare a Scribd company logo
1 of 19
How do computers exchange
secrets using math?
Invited talk (04/24/19) @ Central Middle School, Maryland
Dr. Dharma Ganesan, Ph.D.,
Table of Contents
● Objectives of the presentation
● Cryptography problem - Secret Key Exchange
● Cryptanalysis - How to break the crypto system
● Open problems
● Conclusion
2
Objectives
● Introduce you to the exciting field of modern cryptography
● Demonstrate how math is used to exchange secrets over the Internet
○ Simplified the theory to get across the core ideas
3
Alice Encrypts - Eve sees gibberish - Bob Decrypts
4
Hello Bob
Encryption
Algorithm
(open to all)
Secret
key K
01534236
Secret
Key K
Decryption
Algorithm
(open to all)
Hello Bob
Note: The same secret key K is used by
encryption and decryption algorithms
Kerckhoff’s principle: The enemy (Eve) knows the encryption and decryption algorithms, but not the key
SIGSALY encrypts confidential call (World War II)
5
● Encryption keys were transferred using a special courier
● Do you know how heavy SIGSALY is and how much it costs?
○ 50,000 kg and US $1 Million
● https://www.cryptomuseum.com/crypto/usa/sigsaly/index.htm
Winston Churchill
Franklin Roosevelt
Problem: sender and receiver need the same key
6
Key K Key K
● Alice and Bob are too far away
from each other
● They never met each other
● They cannot exchange the secret
key publicly (Eve is listening)
● How can they arrive at the same
secret key K?
7
We have been (unknowingly) using the mod notation
Let’s go to bed @ 21 hour
21 ≡ 9 (mod 12)
Note: When 21 is divided by 12, 9 is the remainder
What is 5*8 on this clock?
5*8 = 40 ≡ 4 (mod 12) Gauss developed the theory of
modular arithmetic
8
Cryptographers love mod and primes
Cryptographers view this clock as follows:
Z*
13 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}
They use mod 13, which is a prime number
Z*
p = {1, 2, 3, …, p-1}
i 1 2 3 4 5 6 7 8 9 10 11 12
2i 2 4 8 3 6 12 11 9 5 10 7 1
For example, 24 ≡ 3 (mod 13) 2 is a generator of this clock because it generates all hours from 1..12
Why cryptographers use mod and one-way functions?
9
● In a clock, patterns are not that obvious to detect for Eve
● For example, 26 is greater than 27 in mod 13
● Some problems are difficult to answer (without seeing the below table)
● For example, 2i ≡ 11 (mod 13), can you quickly find the i?
i 1 2 3 4 5 6 7 8 9 10 11 12
2i 2 4 8 3 6 12 11 9 5 10 7 1
E
a
s
y
H
a
r
d
Cryptographers use one-way functions: Easy in one direction, but hard the other
Power rule of exponents
(23)4= (23)(23)(23)(23) = 212
(24)3= (24)(24)(24) = 212
So, (23)4 = (24)3
In general, (g 𝑥) 𝑦 = (g 𝑦) 𝑥 = (g 𝑥𝑦) [Proof: homework for you]
10
Diffie-Hellman Key Exchange Algorithm
● In 1970s, they solved the problem of key exchange!
○ Using an one-way function (easy to compute, hard to reverse)
● Alice and Bob arrive at a shared secret key k
○ Using the power rule of exponents (no courier service)
● Eavesdropper Eve cannot easily derive the secret key k
○ Takes billions of years to solve by computers (at this time of writing)
● Diffie, W., and Hellman, M. New directions in cryptography
○ IEEE Trans. Inform. Theory IT-22, 6 (Nov. 1976), 644-654
11
Prof. Hellman (H) Diffie (D)
12
Double the hours 5 times (i.e., 25 mod 13) Double the hours 4 times (i.e., 24 mod 13)
Key Exchange - Visual Demo
Triple the hours 5 times (i.e., 35 mod 13) Sixfold the hours 4 times (i.e., 64 mod 13)
Both Alice and Bob arrive at the same key (9)
Note: 5 and 4 are secrets
13
Pick a random number 𝑥 Pick a random number 𝑦
Compute A = g 𝑥 mod p Compute B = g 𝑦 mod p
Secret K = B 𝑥 mod p Secret K = A 𝑦 mod p
Both Alice and Bob have
the same secret key
Eve sees A and B,
but not 𝑥, 𝑦, or K
Key Exchange Algorithm - Core Idea
(assume that g and p are public)
14
Pick a random number 𝑥 = 5 Pick a random number 𝑦 = 4
Compute A = 25 mod 13 Compute B = 24 mod 13
Secret K = 35 mod 13 = 9 Secret K = 64 mod 13 = 9
Both Alice and Bob
have the secret key 9
DH Key Exchange - Example (g=2, p=13)
15
How can Eve recover the secret key K?
Option 1:
● Eve knows that the secret key can be in {1, 2, … 12}
● She can just try 12 possibilities to decrypt messages
i 1 2 3 4 5 6 7 8 9 10 11 12
2i 2 4 8 3 6 12 11 9 5 10 7 1
Option 2:
● Eve builds the above table and solves B = g 𝑦 mod p
● For example, B = 6 means secret 𝑦 = 5
Other Options?
Cryptographers use a very large clock to trick Eve
16
● Prime p is made of at least 600 digits or so (in 2019)
○ p shall satisfy more properties (not covered here)
● Difficult for Eve to construct the table of all possibilities
● Eve will have to live for several billion years to break it
● Or, she must solve some cool problems (next slide)
p-1
Some cool problems to solve
17
● Problem 1: Given B, g, and p, efficiently find y such that B = g 𝑦 mod p
● Problem 2: Given g 𝑥 mod p and g 𝑦 mod p, find g 𝑥𝑦 mod p
○ The exponents 𝑥 and 𝑦 are not known to Eve, of course
● Problem 3: Find the prime factors p and q of N such that N = p*q
○ I did not talk about this problem in this presentation
○ See https://www.slideshare.net/dganesan11
● If you efficiently solve any one of these problems, you will be a celebrity!
○ Instead of computer games, let’s start thinking about these problems
Conclusion
18
● Computers use math to exchange secret keys over the Internet
● Study algebra and number theory to excel in cryptography
● There are many interesting open problems to solve
● I hope you will choose math/computer science in college
German mathematician Carl Friedrich Gauss (1777–1855) said,
"Mathematics is the queen of the sciences—and number theory is
the queen of mathematics."
19
Thank you Central Middle School
Mr. Clayton Stewart (Math Teacher)
Mrs. Kristy Fidyk (STEM Dept. Chair)

More Related Content

What's hot

The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
Komal Singh
 

What's hot (20)

Analysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent dAnalysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent d
 
Analysis of Shared RSA Modulus
Analysis of Shared RSA ModulusAnalysis of Shared RSA Modulus
Analysis of Shared RSA Modulus
 
Cyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor FunctionCyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor Function
 
Dependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private VariablesDependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private Variables
 
Solutions to online rsa factoring challenges
Solutions to online rsa factoring challengesSolutions to online rsa factoring challenges
Solutions to online rsa factoring challenges
 
RSA Two Person Game
RSA Two Person GameRSA Two Person Game
RSA Two Person Game
 
Active Attacks on DH Key Exchange
Active Attacks on DH Key ExchangeActive Attacks on DH Key Exchange
Active Attacks on DH Key Exchange
 
An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)
 
On deriving the private key from a public key
On deriving the private key from a public keyOn deriving the private key from a public key
On deriving the private key from a public key
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
RSA
RSARSA
RSA
 
Rsa rivest shamir adleman
Rsa rivest shamir adlemanRsa rivest shamir adleman
Rsa rivest shamir adleman
 
Rsa Algorithm
Rsa AlgorithmRsa Algorithm
Rsa Algorithm
 
RSA-W7(rsa) d1-d2
RSA-W7(rsa) d1-d2RSA-W7(rsa) d1-d2
RSA-W7(rsa) d1-d2
 
RSA algorithm
RSA algorithmRSA algorithm
RSA algorithm
 
The RSA Algorithm
The RSA AlgorithmThe RSA Algorithm
The RSA Algorithm
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
 
Public Key Algorithms
Public Key AlgorithmsPublic Key Algorithms
Public Key Algorithms
 
Presentation about RSA
Presentation about RSAPresentation about RSA
Presentation about RSA
 
The rsa algorithm JooSeok Song
The rsa algorithm JooSeok SongThe rsa algorithm JooSeok Song
The rsa algorithm JooSeok Song
 

Similar to How do computers exchange secrets using Math?

Demystifying Zero Knowledge Proofs [FINAL].pptx
Demystifying Zero Knowledge Proofs [FINAL].pptxDemystifying Zero Knowledge Proofs [FINAL].pptx
Demystifying Zero Knowledge Proofs [FINAL].pptx
RedWhite12
 

Similar to How do computers exchange secrets using Math? (20)

Rsa example
Rsa exampleRsa example
Rsa example
 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithm
 
Number theory and cryptography
Number theory and cryptographyNumber theory and cryptography
Number theory and cryptography
 
Ecc2
Ecc2Ecc2
Ecc2
 
On-Homomorphic-Encryption-and-Secure-Computation.ppt
On-Homomorphic-Encryption-and-Secure-Computation.pptOn-Homomorphic-Encryption-and-Secure-Computation.ppt
On-Homomorphic-Encryption-and-Secure-Computation.ppt
 
Greedy1.ppt
Greedy1.pptGreedy1.ppt
Greedy1.ppt
 
Assignment 2 (1) (1).docx
Assignment 2 (1) (1).docxAssignment 2 (1) (1).docx
Assignment 2 (1) (1).docx
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
 
Introduction to nand2 tetris
Introduction to nand2 tetrisIntroduction to nand2 tetris
Introduction to nand2 tetris
 
Discrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
Discrete Logarithmic Problem- Basis of Elliptic Curve CryptosystemsDiscrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
Discrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
 
Ki2518101816
Ki2518101816Ki2518101816
Ki2518101816
 
Ki2518101816
Ki2518101816Ki2518101816
Ki2518101816
 
Stanford splash spring 2016 basic programming
Stanford splash spring 2016 basic programmingStanford splash spring 2016 basic programming
Stanford splash spring 2016 basic programming
 
RailsWayCon 2010 Coding Dojo
RailsWayCon 2010 Coding DojoRailsWayCon 2010 Coding Dojo
RailsWayCon 2010 Coding Dojo
 
Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...
Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...
Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...
 
Slides to RSA Presentation
Slides to RSA PresentationSlides to RSA Presentation
Slides to RSA Presentation
 
lecture1.ppt
lecture1.pptlecture1.ppt
lecture1.ppt
 
Demystifying Zero Knowledge Proofs [FINAL].pptx
Demystifying Zero Knowledge Proofs [FINAL].pptxDemystifying Zero Knowledge Proofs [FINAL].pptx
Demystifying Zero Knowledge Proofs [FINAL].pptx
 
Hash table
Hash tableHash table
Hash table
 
Using timed-release cryptography to mitigate the preservation risk of embargo...
Using timed-release cryptography to mitigate the preservation risk of embargo...Using timed-release cryptography to mitigate the preservation risk of embargo...
Using timed-release cryptography to mitigate the preservation risk of embargo...
 

More from Dharmalingam Ganesan

More from Dharmalingam Ganesan (13)

.NET Deserialization Attacks
.NET Deserialization Attacks.NET Deserialization Attacks
.NET Deserialization Attacks
 
Reverse Architecting using Relation Algebra.pdf
Reverse Architecting using Relation Algebra.pdfReverse Architecting using Relation Algebra.pdf
Reverse Architecting using Relation Algebra.pdf
 
How to exploit rand()?
How to exploit rand()?How to exploit rand()?
How to exploit rand()?
 
Thank-a-Gram
Thank-a-GramThank-a-Gram
Thank-a-Gram
 
Can I write to a read only file ?
Can I write to a read only file ?Can I write to a read only file ?
Can I write to a read only file ?
 
Requirements driven Model-based Testing
Requirements driven Model-based TestingRequirements driven Model-based Testing
Requirements driven Model-based Testing
 
Automated Traceability for Software Engineering Tasks
Automated Traceability for Software Engineering TasksAutomated Traceability for Software Engineering Tasks
Automated Traceability for Software Engineering Tasks
 
Reverse Engineering of Module Dependencies
Reverse Engineering of Module DependenciesReverse Engineering of Module Dependencies
Reverse Engineering of Module Dependencies
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Integer security analysis using smt solver
Integer security analysis using smt solverInteger security analysis using smt solver
Integer security analysis using smt solver
 
Remote file path traversal attacks for fun and profit
Remote file path traversal attacks for fun and profitRemote file path traversal attacks for fun and profit
Remote file path traversal attacks for fun and profit
 
20170605135932210 thank you card7
20170605135932210 thank you card720170605135932210 thank you card7
20170605135932210 thank you card7
 
Threat Modeling: Applied on a Publish-Subscribe Architectural Style
Threat Modeling: Applied on a Publish-Subscribe Architectural StyleThreat Modeling: Applied on a Publish-Subscribe Architectural Style
Threat Modeling: Applied on a Publish-Subscribe Architectural Style
 

Recently uploaded

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 

Recently uploaded (20)

%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 

How do computers exchange secrets using Math?

  • 1. How do computers exchange secrets using math? Invited talk (04/24/19) @ Central Middle School, Maryland Dr. Dharma Ganesan, Ph.D.,
  • 2. Table of Contents ● Objectives of the presentation ● Cryptography problem - Secret Key Exchange ● Cryptanalysis - How to break the crypto system ● Open problems ● Conclusion 2
  • 3. Objectives ● Introduce you to the exciting field of modern cryptography ● Demonstrate how math is used to exchange secrets over the Internet ○ Simplified the theory to get across the core ideas 3
  • 4. Alice Encrypts - Eve sees gibberish - Bob Decrypts 4 Hello Bob Encryption Algorithm (open to all) Secret key K 01534236 Secret Key K Decryption Algorithm (open to all) Hello Bob Note: The same secret key K is used by encryption and decryption algorithms Kerckhoff’s principle: The enemy (Eve) knows the encryption and decryption algorithms, but not the key
  • 5. SIGSALY encrypts confidential call (World War II) 5 ● Encryption keys were transferred using a special courier ● Do you know how heavy SIGSALY is and how much it costs? ○ 50,000 kg and US $1 Million ● https://www.cryptomuseum.com/crypto/usa/sigsaly/index.htm Winston Churchill Franklin Roosevelt
  • 6. Problem: sender and receiver need the same key 6 Key K Key K ● Alice and Bob are too far away from each other ● They never met each other ● They cannot exchange the secret key publicly (Eve is listening) ● How can they arrive at the same secret key K?
  • 7. 7 We have been (unknowingly) using the mod notation Let’s go to bed @ 21 hour 21 ≡ 9 (mod 12) Note: When 21 is divided by 12, 9 is the remainder What is 5*8 on this clock? 5*8 = 40 ≡ 4 (mod 12) Gauss developed the theory of modular arithmetic
  • 8. 8 Cryptographers love mod and primes Cryptographers view this clock as follows: Z* 13 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} They use mod 13, which is a prime number Z* p = {1, 2, 3, …, p-1} i 1 2 3 4 5 6 7 8 9 10 11 12 2i 2 4 8 3 6 12 11 9 5 10 7 1 For example, 24 ≡ 3 (mod 13) 2 is a generator of this clock because it generates all hours from 1..12
  • 9. Why cryptographers use mod and one-way functions? 9 ● In a clock, patterns are not that obvious to detect for Eve ● For example, 26 is greater than 27 in mod 13 ● Some problems are difficult to answer (without seeing the below table) ● For example, 2i ≡ 11 (mod 13), can you quickly find the i? i 1 2 3 4 5 6 7 8 9 10 11 12 2i 2 4 8 3 6 12 11 9 5 10 7 1 E a s y H a r d Cryptographers use one-way functions: Easy in one direction, but hard the other
  • 10. Power rule of exponents (23)4= (23)(23)(23)(23) = 212 (24)3= (24)(24)(24) = 212 So, (23)4 = (24)3 In general, (g 𝑥) 𝑦 = (g 𝑦) 𝑥 = (g 𝑥𝑦) [Proof: homework for you] 10
  • 11. Diffie-Hellman Key Exchange Algorithm ● In 1970s, they solved the problem of key exchange! ○ Using an one-way function (easy to compute, hard to reverse) ● Alice and Bob arrive at a shared secret key k ○ Using the power rule of exponents (no courier service) ● Eavesdropper Eve cannot easily derive the secret key k ○ Takes billions of years to solve by computers (at this time of writing) ● Diffie, W., and Hellman, M. New directions in cryptography ○ IEEE Trans. Inform. Theory IT-22, 6 (Nov. 1976), 644-654 11 Prof. Hellman (H) Diffie (D)
  • 12. 12 Double the hours 5 times (i.e., 25 mod 13) Double the hours 4 times (i.e., 24 mod 13) Key Exchange - Visual Demo Triple the hours 5 times (i.e., 35 mod 13) Sixfold the hours 4 times (i.e., 64 mod 13) Both Alice and Bob arrive at the same key (9) Note: 5 and 4 are secrets
  • 13. 13 Pick a random number 𝑥 Pick a random number 𝑦 Compute A = g 𝑥 mod p Compute B = g 𝑦 mod p Secret K = B 𝑥 mod p Secret K = A 𝑦 mod p Both Alice and Bob have the same secret key Eve sees A and B, but not 𝑥, 𝑦, or K Key Exchange Algorithm - Core Idea (assume that g and p are public)
  • 14. 14 Pick a random number 𝑥 = 5 Pick a random number 𝑦 = 4 Compute A = 25 mod 13 Compute B = 24 mod 13 Secret K = 35 mod 13 = 9 Secret K = 64 mod 13 = 9 Both Alice and Bob have the secret key 9 DH Key Exchange - Example (g=2, p=13)
  • 15. 15 How can Eve recover the secret key K? Option 1: ● Eve knows that the secret key can be in {1, 2, … 12} ● She can just try 12 possibilities to decrypt messages i 1 2 3 4 5 6 7 8 9 10 11 12 2i 2 4 8 3 6 12 11 9 5 10 7 1 Option 2: ● Eve builds the above table and solves B = g 𝑦 mod p ● For example, B = 6 means secret 𝑦 = 5 Other Options?
  • 16. Cryptographers use a very large clock to trick Eve 16 ● Prime p is made of at least 600 digits or so (in 2019) ○ p shall satisfy more properties (not covered here) ● Difficult for Eve to construct the table of all possibilities ● Eve will have to live for several billion years to break it ● Or, she must solve some cool problems (next slide) p-1
  • 17. Some cool problems to solve 17 ● Problem 1: Given B, g, and p, efficiently find y such that B = g 𝑦 mod p ● Problem 2: Given g 𝑥 mod p and g 𝑦 mod p, find g 𝑥𝑦 mod p ○ The exponents 𝑥 and 𝑦 are not known to Eve, of course ● Problem 3: Find the prime factors p and q of N such that N = p*q ○ I did not talk about this problem in this presentation ○ See https://www.slideshare.net/dganesan11 ● If you efficiently solve any one of these problems, you will be a celebrity! ○ Instead of computer games, let’s start thinking about these problems
  • 18. Conclusion 18 ● Computers use math to exchange secret keys over the Internet ● Study algebra and number theory to excel in cryptography ● There are many interesting open problems to solve ● I hope you will choose math/computer science in college German mathematician Carl Friedrich Gauss (1777–1855) said, "Mathematics is the queen of the sciences—and number theory is the queen of mathematics."
  • 19. 19 Thank you Central Middle School Mr. Clayton Stewart (Math Teacher) Mrs. Kristy Fidyk (STEM Dept. Chair)