El-Shorouk Academy Acad. Year : 2010/ 2011 Higher Institute for

advertisement
El-Shorouk Academy
Higher Institute for Computer &
Information Technology
Department of Computer Science
Acad. Year : 2010/ 2011
Term
: First
Year
: Fourth
Computer Security
Sheet # 2’s Solution
the plaintext” Hi my friend” and k=3 deduce corresponding cipher text
using caeser cipher.
1. Given
 C(H)=C(8+3)mod 26=11 =k
 KL Pb iulhqg
2. Given the plaintext ” shrouk academy” and k=5 deduce corresponding cipher text
using caeser cipher.
 C(shrouk academy) = xmwtzp fhfijrd
3. Given the plain text "meet me after the party, k = 2 deduce corresponding cipher
text using Rail-Fence cipher technique.
Plaintext with Rail-Fence of depth 2:
m
e
m
a
t
r
h
p
r
y
e
t
e
f
e
t
e
a
t
-
Cipher text is : mematrhpryetefeteat
4. Given the plain text "ifwewishtoreplaceletters", deduce corresponding cipher text
using Monoalphapetic cipher and the key :
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN
Plain text= ifwewishtoreplaceletters
Cipher text=WIRFRWAJUHYFTSDVFSFUUFYA
5. Given the plaintext ” shrouk academy ” and the key “ security ” deduce
corresponding ciphertext using playfair cipher.
1
s
e
c u r
I/j t y a B
d f g h K
i m n o P
q v w x Z
Shrouk academy
Uduprh yui/jhtvy
6. Given the plain text ” Hi my friend ” and the key “ playfair ” deduce corresponding
ciphertext using playfair cipher.
p
i/j
e
n
u
l
r
g
o
v
a
b
h
q
w
y
c
k
s
x
F
D
M
T
z
7. Given the plain text” Hi my friend” and the key =
15 15
20 25
Deduce corresponding cipher text using a 2*2 hill cipher.
abc de f ghi j k l mn o p q r s t u v w x y Z
01234567891 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
C = KP mod 26
C1 C3 = 15 15
7 12
C2 C4
8
20 25
24
C5 C7 = 15 15
5 17
C6 C8
8
20 25
4
mod 26 =
225 540
17 20
340 840 =
2
195 315
mod 26
8
13
u
mod26 = c
i
3
= 300 440 mod26= 14 2
2
r
=
n
d
o
c
C9
=
C10
15 15
13
20 25
3
240
6
mod 26 = 335
mod26 =
23
g
=
x
Cipher text : rcuinodcgx
8. That the plaintext “ Friday “ is encrypted using 2*2 Hill cipher to yield the ciphertext
” PQCFKU” ,find the key.
abc de f ghi j k l mn o p q r s t u v w x y Z
01234567891 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
C = KP mod 26
C Pֿ¹ = K P pֿ¹ mod26 → C P ֿ ¹ = K mod26
→ k= C P ֿ ¹ mod 26
The inverse of P can be computed:
A=
Aֿ¹ =
Pֿ¹= 9 2
1 5
15 2
9 2
16 5
1 15 mod26 =
137 60
149 107
3
7
mod26 =
8
19 3
, This result is verified by testing the remaining plaintext-cipher text
pair.
9. Given
the plaintext ‘ Hi my friend’ and the key “ message ”
corresponding ciphertext using Vigenère cipher.
plaintext
H i my f r I e n d
key
m e s s a g e m e s
cipher text TMEQFXMQRV
4
deduce
Download