LECT 4 - Foundations of Cryptography Cont.
LECT 4 - Foundations of Cryptography Cont.
cipher
Consider encrypting English
text
Associate a with b with … z with
0; 1; ; 25
k {0, …, 25}
To encrypt using key k, shift every letter of
the ositions (with wraparou
plaintext
Decry by kdoes
tion just p helloworldz
the reverse
p nd)
ccccccccccc
jgnnqyqtnfb
Modular
arithmetic
x = x’ mod N if and only if N divides x-x’
• [x mod N] = The remainder when x is
divided by N
• I.e., The unique value x’{0, …, N-1}
such that
25 =x35= mod
x’ mod N
10
25 ≠ [35 mod
10]
5 = [35 mod
10]
The shift cipher,
formally
M = {strings over lowercase English
alphabet}
Gen: choose uniform k{0, …, 25}
Enck(m1…mt): output c1…ct, where
ci := [mi + k mod 26]
Deck(c1…ct): output m1…mt, where
mi := [ci - k mod 26]
168 2168 = 3.7 1050 2167 µs = 5.9 1036 years 5.9 1030 years
26 characters 26! = 4 1026 2 1026 µs = 6.4 1012 years 6.4 106 years
(permutation)
Summar
y
Symmetric
encryption
Public encryption
Digital Signature
Private-key
cryptography
Private-key cryptography allows two users who
share a
secret key to establish a “secure channel”
The need to share a secret key incurs
several
drawbacks…
The key-distribution
problem
How do users share a key in the first
place?
• Need to share the key using a secure
channel…
Thi problem can be solved in some
s settings…
• E.g., physical proximity, trusted
• courier
…but(Note: this does
not others (or atnot make
least not
private-key cryptography useless)
cheaply)
The key-management
problem
Imagine an organization with N employees, eac
where h
pair of employees might need to
communicate
securely
Solution using private-key cryptography:
• Each user shares a key with all other
users
Each user must store/manage N-1 secret
keys!
O(N2) keys overall!
Lack of support for “open
systems”
Say two users who have no prior relationship
want to
communicate securely
• When would they ever have shared a key?
Cryptographic technique
analogous to hand-written
signatures.
sender (Bob) digitally signs document,
establishing he is document
verifiable, nonforgeable: recipient (Alice) can
owner/creator.
prove to someone Bob, and no one
that (including else have signed
Alice), must
document
Digital Signatures
Simple digital signature for
message m:
Bob- signs m by encrypting with- his
private
Bob’s message,key
m KB, creating
K Bob’s “signed”
- private
K
-
(m)
B key B
message,
Dear Alice KB(m)
Oh, how I have missed
Bob’s message, m,
you. I think of you all the Public key signed (encrypted)
time! …(blah blah blah) encryptio with his private key
Bob n
algorithm