Professional Documents
Culture Documents
Modern Cryptography
Jeremy R. Johnson
Introduction
Objective: To see how to securely communicate on the internet
without giving up privacy. To understand what a public key
cryptosystem is and how the RSA algorithm works. To do
impossible things.
Modern cryptography
Solutions to some impossible problems
Public Key Cryptosystems
Modular Arithmetic
RSA Algorithm
Classical Cryptography
Basic problem: Secure communication over an
insecure channel
Solution: private key encryption
m E(k,m) = c D(k,c) = m
Substitution Cypher
HELLO
ALL HAIL CEASAR
Substitution Cypher
KHOOR
DOO KDLO FHDVDU
Frequency Analysis
en.wikipedia.org/wiki/Frequency_analysis_(cryptanalysis)
scottbryce.com/cryptograms
8
What To Do
ASCII Table
What To Do
Modern Cryptography
Adversarys resources are
computationally bounded
Probabilistic polynomial time algorithm
17
18
19
20
22
Wheres Waldo
23
Open Sesame
Secure Passwords
Every users stores a statement of a theorem in a
publicly readable directory
Upon login, the user engages in a zeroknowledge proof of the correctness of the
theorem
If the proof is convincing access is granted
Guarantees that an adversary who overhears the
proof can not learn enough to gain access
26
27
Clock Arithmetic
0
1
11
2
10
8
7+6 = ?
5
29
Clock Arithmetic
0
1
11
2
10
8
7+1
5
30
Clock Arithmetic
0
1
11
2
10
8
7+2
5
31
Clock Arithmetic
0
1
11
2
10
8
7+3
5
32
Clock Arithmetic
0
1
11
2
10
8
7+4
5
33
Clock Arithmetic
0
1
11
2
10
8
7+5
5
34
Clock Arithmetic
0
1
11
2
10
8
7
7 + 6 = 1 (mod 12)
5
35
Clock Arithmetic
0
1
11
2
10
8
55=?
5
36
Clock Arithmetic
0
1
11
2
10
8
52
5
37
Clock Arithmetic
0
1
11
2
10
8
53
5
38
Clock Arithmetic
0
1
11
2
10
8
54
5
39
Clock Arithmetic
0
1
11
2
10
8
7
5 5 = 1 (mod 12)
5
40
41
42
[Reflexive]
a a (mod n)
a b (mod n) b a (mod n) [Symmetric]
a b (mod n) and b c (mod n) a c (mod n) [Transitive]
44
Representation of Zn
The equivalence classes [a] mod n, are typically represented by
the representatives a.
45
Euclidean Algorithm
gcd(a,b)
if b = 0 then
return a
else
return gcd(b, a mod b)
Example: gcd(30,12)
gcd(12,6)
gcd(6,0)
Efficient!!! O(log N), a, b N
47
Modular Inverses
Definition: x is the inverse of a mod n, if ax 1 (mod n)
The equation ax 1 (mod n) has a solution iff gcd(a,n) = 1.
Extended Euclidean Algorithm, there exist x and y such that
ax + ny = gcd(a,n).
When gcd(a,n) = 1, ax + ny = 1
ax 1 (mod n)
Example
gcd(5,12) = 1, 5 5 + -2 12 = 1
48
Examples:
49
Eulers Identity
50