Fachbereich Mathematik Mohamed Barakat
Wintersemester 2010/11 Simon Hampe
Cryptography
Homework assignment 3
Due date: Wednesday 17/11 at 13:45
Exercise 1. Solve exercise 2.1.4:
Let (Ω, µ) be a finite probability space and X : Ω → M and Y : Ω → N be two random variables. Prove:
(1) Bayes’ formula:
µX|Y(m |n) =µY|X(n|m)µX(m) µY(n) if µX(m), µY(n)>0. Or equivalently:
µX|Y(m|n)µY(n) =µY|X(n |m)µX(m).
(2) X and Y are independent iff for all m∈M and n ∈N µY(n) = 0 or µX|Y(m|n) =µX(m).
Exercise 2. Solve exercise 2.1.5:
Let (Ω, µ) be a finite probability space and X, Y : Ω → M := C be two random variables. Define X+· Y : Ω→C by (X +· Y)(x) =X(x)+· Y(x). Prove:
(1) E(X) =P
m∈MmµX(m).
(2) E(X+Y) =E(X) +E(Y).
(3) E(XY) =E(X)E(Y) if X and Y are independent. The converse is false.
Exercise 3. Solve exercises 2.2.1 and 2.2.3:
LetP ={a, b} with µP(a) = 14 and µP(b) = 34. Let K :={e1, e2, e3} with µK(e1) =
1
2, µK(e2) = µK(e3) = 14. Let C := {1,2,3,4} and E be given by the following encryption matrix:
E a b e1 1 2 e2 2 3 e3 3 4
(1) Compute the probability µC and the conditional probability µP|C. (2) Is the cryptosystem K defined above perfectly secret for the givenµP? Exercise 4. The Hill cipher is defined by taking:
• A1 =A2 =A=:Z/mZ, for some m ∈N≥2.
• P =C:=A•.
• K =K′ = GLn(Z/mZ) for some fixed n.
1
• Ee : (An)l →(An)l, p= (pi)li=1 7→(e·pi)li=1 for an arbitrary l and e∈K.
(1) Describe κ:K →K′. (2) For m= 25 compute κ(
1 4 10 3 13 9 6 2 23
).
(3) Show that the Hill cipher does not fulfill OW-CPA.