Professional Documents
Culture Documents
Encryption
Agenda
n
n
n
Overview of encryption
How public-key encryption works
How to use it for security on the web
(next lecture)
Encryption as Function
n
n
n
Plaintext string s
Encryption key Kenc
Decryption key Kdec
Encrypt s with Kenc to obtain ciphertext
Kenc(s)
Decrypt Kenc(s) with decryption key Kdec
to reobtain s
Kdec(Kenc(s)) = s
Encryption in Words
n
A Brief History
n
A Brief History
Substitution Ciphers
n
Letter
Word
Common phrases
Polygram Cipher
n
ciphertext
AAA
QWE
AAB
RTY
AAC
ASD
n
8
Substitution Rules
n
Substitution Rules
n
10
Correspond to a 0? No change
n
n
11
12
13
14
Triple DES
n
15
Review of Crypto
n
16
Public-Key Cryptography
n
n
n
17
This is critical!
Two Modes
n
n
18
Public-key cryptography
Two Modes
n
n
19
Digital Signatures
n
20
Add 2; Multiply by 3
Prime Factorization
n
21
INTERMISSION
Modular arithmetic
notation!!
3 = 8 (mod 5)
22
23
Ap
Ap mod p
A mod p
64
24
Ap
Ap mod p
A mod p
64
1024
25
Ap
Ap mod p
A mod p
64
1024
11
1977326743
26
Ap
Ap mod p
A mod p
64
1024
11
1977326743
12
13841287201
27
Ap-1
Ap-1 mod p
16
256
11
282475249
12
1977326743
28
n is product of primes p, q
29
Set = (p-1)(q-1)
Choose e randomly, s.t. e <
Choose d, s.t. de = 1 (mod )
encryptn,e(m) = me (mod n) = c
decryptn,d(c) = cd (mod n) = m
Will decryption always work?
n
n
n
Which implies:
n
n
30
mp-1 = 1 (mod p)
mq-1 = 1 (mod q)
m(p-1)(q-1) = 1 (mod p)
m(p-1)(q-1) = 1 (mod q)
cd = m * (m(p-1)(q-1))k
Recall from Fermat that
n
n
n
n
n
31
m(p-1)(q-1) = 1 (mod p)
m(p-1)(q-1) = 1 (mod q)
m(p-1)(q-1) = 1 (mod n), where n = pq
cd = m * (1)k (mod n)
cd = m (mod n)
Thus, decrypted ciphertext c = msg m
Review
n
encryptn,e(m) = me (mod n) = c
decryptn,d(c) = cd (mod n) = m
32
Uses
1.
2.
33