You are on page 1of 7

Mohammad Hajjat

20010171102
Review Questions:
Question 2.3)
It depends on type of Encryption technique used.
Symmetric / single-key / secret-key / Conventional Encryption one key
for both sender and receive.
Asymmetric / two-key / public-key two keys; one for sender and one for
receive.
Question 2.7)
Unconditionally
Secure
Computationally
Secure

Question 2.11)
Mono-alphabetic
cipher

Poly-alphabetic
cipher

No matter how much Cipher text is available and no matter


time is available we can't get the corresponding Plaintext.
We can decrypt the data BUT it will not be useful because
The cost of deciphering the data > value of encrypted
data
Time required to decipher the data > useful lifetime of
the data.

The mapping used for single characters. Each plaintext


letter maps to a different ciphertext letter.
Key is 26 letters long 26! Possible keys.
Letter frequency is used to cryptanalysis hacks.
Uses multiple cipher alphabets. For eg. the Vigenere cipher
maps the same plain-text letter to multiple ciphertext
letters.
Letter frequency is hard to implement here.

Problems:
Question 2.4)
This question is not clear and mixes the two versions together.

Itwasdisclosedyesterdaythatseveralinformalbut
directcontactshavebeenmadewithpolitical
representativesofthevietconginMoscow.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
S A H V P B
W U C
X T D M Y
E O Z I F Q
G
We can formulate it like this
----------------------------------S
P
U
T
?
I
G (? Chars = J K L N R)
A
B
C
D
E
F
?
H
?
?
M
O
Q
V
W
X
Y
Z
?
Or
---------------------S
A
H
V
P
B
J
W
U
C
K
X
T
D
M
Y
N
E
O
Z
I
F
Q
?

G
?
And then stretching it out
SPUTING - ABCDEF HJKMOQ- VWXYZ
So the keyword would be Sputing.
Question 2.6)
We first write each letter with its corresponding numerical value
A
B
C
D
E
F
G
H
I
J
K
0
1
2
3
4
5
6
7
8
9
10

L
11

M
12

N
13

Y
24

Z
25

O
14

P
15

Q
16

R
17

S
18

T
19

U
20

V
21

W
22

X
23

The plaintext:
"Meet me at the usual place at then rather than eight oclock"
Corresponding Values:
M
E E T
M
E
A T
T
H E
U
12 4 4 19
12 4
0 19
19 7 4
20
P
15

L
11

A
0

C
2

T
19

H
7

A
0

N
13

The key =

E
4
E
4

A
0

T
19

I
8

G
6

T
19
H
7

T
19

H
7

E
4
O
14

N
13
C
2

R
17
L
11

O
14

A
0
C
2

S
18
T
19

U
20

A
0

L
11

H
7

E
4

R
17

K
10

9 4

5 7

Then using Matlab


>> mod([9 4 ; 5 7]*[12;4],26)
ans =
20
10
>> mod([9 4 ; 5 7]*[4;19],26)
ans =
8
23
>> mod([9 4 ; 5 7]*[0;19],26)
ans =
24
3
>> mod([9 4 ; 5 7]*[19;7],26)
ans =
17
14
>> mod([9 4 ; 5 7]*[4;20],26)
ans =
12
4

>> mod([9 4 ; 5 7]*[18;20],26)


ans =
8
22
>> mod([9 4 ; 5 7]*[0;11],26)
ans =
18
25
>> mod([9 4 ; 5 7]*[15;11],26)
ans =
23
22
>> mod([9 4 ; 5 7]*[0;2],26)
ans =
8
14
>> mod([9 4 ; 5 7]*[4;0],26)
ans =
10
20
>> mod([9 4 ; 5 7]*[19;19],26)
ans =
13
20
>> mod([9 4 ; 5 7]*[7;4],26)
ans =
1
11
>> mod([9 4 ; 5 7]*[13;17],26)
ans =
3
2
>> mod([9 4 ; 5 7]*[0;19],26)
ans =
24
3
>> mod([9 4 ; 5 7]*[7;4],26)
ans =
1
11

>> mod([9 4 ; 5 7]*[17;19],26)


ans =
21
10
>> mod([9 4 ; 5 7]*[7;0],26)
ans =
11
9
>> mod([9 4 ; 5 7]*[13;4],26)
ans =
3
15
>> mod([9 4 ; 5 7]*[8;6],26)
ans =
18
4
>> mod([9 4 ; 5 7]*[7;19],26)
ans =
9
12
>> mod([9 4 ; 5 7]*[14;2],26)
ans =
4
6
>> mod([9 4 ; 5 7]*[11;14],26)
ans =
25
23
>> mod([9 4 ; 5 7]*[2;10],26)
ans =
6
2

Corresponding Cipher:
M
E
E T
M
20 10 8 23
20
U
K
I X
U

E
10
K

P
23
X

L
22
W

A
8
I

C
14
O

A
20
U

T
10
K

H
11
L

A
9
J

N
3
D

E
10
K
E
15
P

I
18
S

A
24
Y
T
13
N
G
4
E

T
3
D
T
20
U

H
9
J

T
12
M

T
17
R
H
1
B

E
11
L
O
4
E

H
14
O
N
3
D
C
6
G

E
12
M

U
4
E
R
2
C

L
25
Z

A
24
Y
O
23
X

S
8
I
T
3
D
C
6
G

U
22
W
H
1
B

A
18
S
E
11
L

L
25
Z
R
21
V

K
2
C

Decryption:
Decryption requires the inverse of K.
K K-1 = I
K=

9 4

5 7

K-1 =

7 4
1
1 7 4

(9 7 4 5) 5 9
43
5 9

We get the P vector as the following


P = K-1 C mod 26 = K-1 KP = P

C
1 7 4
i mod 26

43 5 9
C i 1

P
i

i 1

1/43 = 0.023256 so we can use 23


20
U
8
I

10
K
23
X

7 4

5 9

7 4

5 9

23

20
U

10
K

24
Y

3
D

17
R

14
O

12
M

4
E

23

22
W

23

8
I

23 mod 26

7 4

5 9

23

12

19

7 4 20


mod 26

5 9 10

19

17

14 mod 26

19

7 4

5 9

12
M

4
E

12

24

3 mod 26

23

4
E

19
T

12
M

0
A

19
T

19
T

4
E

7
H

17

4 mod 26

17

4
E

7 4 8


mod 26

5 9 22

18

20

18
S

20
U
11
L

7 4

5 9

25
Z

23

23
X

22
W

23

14
O

20

10 mod 26

23

18
S

8
I

23

7 4

5 9

20

10 mod 26

12

0
A

7 4

5 9

12

15
P

20

10 mod 26

7 4 8
0

mod 26

5 9 14
2

23

20
U

0
A

11
L

2
C

10
K

20
U

23

13
N

20
U

23

1
B

11
L

3
D

2
C

11
L

23

10
4
20 mod 26 0


13

20 mod 26

2 mod 26

13

17

7 4

5 9

7 4

5 9

1
7
11 mod 26 4

21
V

10
K

11
L

9
J

23

3
D

15
P

23

18
S

4
E

23

9
J

12
M

23

4
E

6
G

20

10 mod 26

7 4 20


mod 26

5 9 10

11
7
9 mod 26 0

7 4

5 9

15 mod 26

7 4

5 9

7 4

5 9

23

12 mod 26

6 mod 26

7 4

5 9

23

14

25

23 mod 26

7 4 6

mod 26

5 9 2

23

19

10

7
H

8
I

14
O

4
E

6
G

7
H

19
T

0
A

13
N

4
E
17
R

11

14

19
T

7
H

17
R

0
A

19
T

4
E

13
N

13

7 4 18
8

mod 26

5 9 4
6

7
H

12

7 4

5 9

0
A

19
T

12

23

4
E

19

19

1
7
11 mod 26 4

7 4

5 9

1
B

2
C

23

23

6
G

7 4

5 9

7 4

5 9

3
D

23
X

23

24
Y

25
Z

7 4

5 9

19
T
2
C

11
L

2
C

10
K

14
O

Question 2.10)
By reading the last word of each line we get the following message
George, your package should be ready by Friday 21st, room three. Please
destroy this immediately.

You might also like