Slides 1
Slides 1
James L. Massey
1
Cryptology
(“hidden word”)
Cryptography Cryptanalysis
(code making) (code breaking)
2
Goals of cryptography
Secrecy Authenticity
3
Secrecy - concerned with who has access to
(or can read) a legitimate message.
4
Authenticity - concerned with who can create
(or write) a legitimate message.
5
A secrecy scheme: The Caesar Cipher
0
25 1 Arithmetic on a CIRCLE
24 A (Modulo 26 arithmetic)
Z B 2
Y Encrypt = Add 3
23 C
. (move clockwise 3 places)
.
X
. Decrypt = Subtract 3
.. . (move counterclockwise 3 places)
SECRET KEY = 3
C A E S A R plaintext
F D H V D U ciphertext
M A S S E Y plaintext
P D V V H B ciphertext 6
Today we use a SMALLER CIRCLE!
1 ⇒ Decrypt = Encrypt
8
Photograph of
Shannon at home
in 1962. (from the
New York Times
Magazine, 30
December 2001)
9
“As a first step in the mathematical analysis of
cryptography, it is necessary to idealize the
situation suitably, and to define in a
mathematically acceptable way what we shall
mean by a secrecy system.”
C.E. Shannon, "Communication Theory of Secrecy Systems",
Bell System Tech. J., vol. 28, pp. 656-715, Oct., 1949.
10
He drew a picture!
(Shannon, 1949)
11
Claude Elwood Shannon (1916-2001)
(photographed 17 April 1961 by Göran Einarsson) 12
Shannon’s
Fig. 1—Schematic of a general secrecy system
makes the following assumptions crystal clear:
• The message M and the key K are independent
random variables.
• The sender and receiver both know the key.
• The attacker knows only the cryptogram E (i.e., a
ciphertext-only attack is assumed).
• The receiver is able to recover the message M from
knowledge of the cryptogram E and key K.
• No assumption is made about who generates the key.
15
Vernam’s 1926 Cipher:
Enemy cryptanalyst
in a ciphertext-only
attack.
Binary M E M
Plaintext Destination
Source R R
Secure Channel
R
R is the secret key,
a “totally random” BSS
sequence. Binary Symmetric Source
17
The Binary Symmetric Source (BSS) of
information theory is a monkey with a fair
binary coin ( 0 on one side and 1 on the other).
18
Cryptographic property of the BSS:
Example:
BSS output: 0 1 0 0 1 0 1 0 1 1 1 0 1 ...
Arb. Ran. Seq. 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
Modulo-2 sum 1 0 1 1 0 1 0 1 0 0 0 1 0 ...
19
Vernam’s cipher provides perfect secrecy
against a ciphertext-only attack!
Binary M E M
Plaintext Destination
Source R R
Secure Channel
R
BSS
The cryptogram E that the enemy cryptanalyst
sees is independent of the plaintext message M.
This simple proof of unbreakability of Vernam’s
1926 cipher was first given by Shannon in 1949! 20
Vernam’s cipher is usually today called the
“one-time pad” to emphasize that the key is
to be used for only one message . It was
used by spies on both sides in World War II
and is still the cipher of choice for
extremely important secret communications.
21
Vernam’s cipher needs as many binary
digits of secret key as there are bits of
plaintext to be encrypted.
22
Shannon’s 1949 Lower Bound on Key Length:
For perfect secrecy, the number of different
keys must be AT LEAST AS GREAT as the
number of different plaintexts.
Proof:
• For any fixed key k, the number of different ciphertexts
e equals the number of different plaintexts m.
• Perfect secrecy ⇒ for all possible e and any fixed m,
P(E=e|M=m) = P(E=e) ≠ 0
• ⇒ For a fixed m, the number of different ciphertexts e
must equal at least the number of different plaintexts m.
• But all keys from a fixed m to different e’s must be
different.
23
Shannon later gave the following proof of a slightly
weaker lower bound on key length, namely
H(K) ≥ H(E).
K
Achieves perfect secrecy and the number of
binary digits of the key K is H(M), which
satisfies Shannon’s lower bound with equality.
25
Simmons’ Model of a
Substitution Attack on an Authenticity System
ACCEPTED
MESSAGE M ENCIPHERER
E E' DECIPHERER
SOURCE TK TK-1 M'
ENEMY CRYPTANALYST
K K
Secure Channel
K
RECOGNIZED
KEY UNAUTHENTIC
SOURCE
30
The informational divergence (or the “Kullbach-
Leibler distance” or the “relative entropy” or the
“discrimination”) from P to Q, two probability
distributions on the same alphabet, is the quantity
Q(x)
D ( P || Q ) = − ∑ P(x) log .
x∈supp ( P ) P(x)
32
For the important special case where α = 0, i.e., where
we never err when H0 is true, the previous bound gives
− D ( PY | H 0 || PY | H 1 )
β ≥2 .
Now suppose that H0 is the hypothesis that the
observation Y = E' is the legitimate cryptogram E for
the key K = k, i.e.,
PY |H 0 ( y ) = PE | K = k ( y ) , and that H1 is the hypothesis
that Y = E' is formed by the attacker according to
PY |H 1 ( y ) = PE ( y ) = ∑ PK = k ( k ) PE | K = k ( y ) ,
k
which may not be the optimum attacking strategy.
Let βk be the error probability when K = k so that
− D ( PE | K = k || PE )
βk ≥ 2 .
33
PE ( y )
D ( PE |K = k || PE ) = − ∑ PE | K = k ( y ) log
PE | K = k ( y )
y
− ∑ D ( PE|K =k || PE )
β = ∑ PK (k )β k ≥ ∑ PK (k )2 k
k k
− ∑ PK ( k )D ( PE|K =k || PE )
≥2 k
∑ PK ( k )D ( PE|K =k || PE ) = H ( E ) − H ( E | K ) = I ( E ; K ) .
k
Moreover, β is just the probability PI of successful
impersonation, so the information-theoretic bound
becomes
PI ≥ 2 − I ( K ; E ) .
This completes the proof of Simmons’ lower bound. 34
Simmons’ proof of his bound on the probability of
deception (or impersonation) appears in
G. J. Simmons, "Authentication Theory/Coding Theory," pp. 411-431 in Advances in
Cryptology - CRYPTO '84 (Eds. G. R. Blakey and D. Chaum), Lecture Notes in
Computer Science No. 196. Heidelberg and New York: Springer, 1985.