This was an invited talk at the Central Middle School, Maryland. Without going into a lot of math, I try to explain the fundamental key exchange problem. It was a blast. 8th graders enjoyed it as much as I enjoyed it.
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
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
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?
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
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
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
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)
Double the hours 4 times (i.e., 24 mod 13) Send the clock to Bob Send the clock to Alice 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
A = g mod p Compute B = g mod p Secret K = B mod p Secret K = A mod p Send A to Bob Send B to Alice 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)
number = 4 Compute A = 25 mod 13 Compute B = 24 mod 13 Secret K = 35 mod 13 = 9 Secret K = 64 mod 13 = 9 Send A = 6 to Bob Send B = 3 to Alice Both Alice and Bob have the secret key 9 DH Key Exchange - Example (g=2, p=13)
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?
• 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
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
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."