Shannon's Theory of Secure Communication: CSG 252 Fall 2006 Riccardo Pucella
Shannon's Theory of Secure Communication: CSG 252 Fall 2006 Riccardo Pucella
Shannon's Theory of Secure Communication: CSG 252 Fall 2006 Riccardo Pucella
Communication
Riccardo Pucella
Introduction
Last time, we have seen various cryptosystems, and some
cryptanalyses
How do you ascertain the security of a cryptosystem?
Single dice:
Ω = {1,2,3,4,5,6}
Pr ({4}) = 1/6
Pr ({1,3,5}) = 3/6 = 1/2
Pair of dice:
Ω = {(1,1),(1,2),(1,3),(1,4),...,(6,5),(6,6)}
Pr ({(1,1)}) = 1/36
Pr ({(1,a) ∣a=1,2,3,4}) = 4/36 = 1/9
Joint Probabilities
Pr({a,b}) = Pr1({a})Pr2({b})
Extending by additivity
Conditional Probability
Pr ( {w∣X(w)=x} )
Conditional probabilities:
Pr (X=x∣Y=y) = Pr ({w∣X(w)=x}∣{w∣Y(w)=y})
!
Pr (P = x) k•ek (x)=y Pr (K = k)
Pr (P = x | C = y) = !
x! ,k•ek (x! )=y Pr (P = x! )Pr (K = k)
Perfect Secrecy
We say a cryptosystem has perfect secrecy if
x P y C k K ● ek(x) = y
Vernam Cipher
Also know as the one-time pad
P = C = K = (Z2)n
Strings of bits of length n
Intuition
Suppose a random variable that takes value {1,...,n} with
some nonzero probability
Consider the string of values generated by that
probability distribution
What is the most efficient way (in number of bits) to
encode every value to minimize how many bits it take to
encode a random string?
Fix a value y of Y
Define the random variable X|y such that
Pr (X|y = x) = Pr (X=x | Y=y)
!
H(X | y) = − Pr (X = v | Y = y) log2 Pr (X = v | Y = y)
v∈V
Example:
If all letters have the same probability, a first
approximation would be 4.7
For English, based on probabilities of plaintexts
(letters), a first approximation is 4.19
For pairs of letters? Triplets of letters? ...
H(P n )
Entropy of L: HL = lim
n→∞ n
Redundancy of L: HL
RL = 1 −
log2 |P |
Unicity Distance
Theorem: Suppose (P,C,K,E,D) is a cryptosystem with |C| = |P|
and keys are chosen equiprobably, and let L be the underlying
language. Given a ciphertext of length n (sufficiently large), the
expected number of spurious keys sn satisfies
|K|
sn ≥ nR
− 1
|P | L
The unicity distance of a cryptosystem is the value n0 after
which the number expected number of spurious keys is 0.
Average amount of ciphertext required for an adversary to
be able to compute the key (given enough time)
Substitution cipher: n0 = 25
So have a chance to recover the key if encrypted message
is longer than 25 characters