Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Assuming you can do 2^20 encryptions per second and the key size is 40 bits,

ID: 3581090 • Letter: 1

Question

1. Assuming you can do 2^20 encryptions per second and the key size is 40 bits, how many days would a brute force attack take? What happens if you double the key size? 2. You have encrypted a message circulating in a channel. It appears that this message is ciphered with an offline function as follows: Y= ax+b, where x is the plain text, y is the ciphered text. The constants a and b, together, represent the secret key. If the cipher text starts with BBDJ and you know the plaintext starts with OOPS, What is the key? 1. Assuming you can do 2^20 encryptions per second and the key size is 40 bits, how many days would a brute force attack take? What happens if you double the key size? 2. You have encrypted a message circulating in a channel. It appears that this message is ciphered with an offline function as follows: Y= ax+b, where x is the plain text, y is the ciphered text. The constants a and b, together, represent the secret key. If the cipher text starts with BBDJ and you know the plaintext starts with OOPS, What is the key? 2. You have encrypted a message circulating in a channel. It appears that this message is ciphered with an offline function as follows: Y= ax+b, where x is the plain text, y is the ciphered text. The constants a and b, together, represent the secret key. If the cipher text starts with BBDJ and you know the plaintext starts with OOPS, What is the key?

Explanation / Answer

Ans 1->

The key space has 240 elements, so brute force would take 220 seconds, which is about 12 days.

220 = 1048576 sec

     = 1048576/60*60= 291.27 hrs

which is apprximately equal to 12.13 days i.e 12 days.

If you double the key size i.e 80 , then the encryption time has no effect but the decryption time is increased to about 260 i. e approx 3.5 * 1016 years.

Ans->2

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

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

For the affine cipher, the encryption function is of the form e(x) = ax+b (mod 26).

An affine cipher has the form yax+b where x is the plaintext and y is the ciphertext(both integers modulo 26). We need to find a and b Converting to numbers, the plaintext is 14,14, 15, 18 and the ciphertext is 1, 1, 3, 9. Thus we need to solve the equations 14 a + b= 1 and 15a+b= 3. Substracting the equations,we find a= 2 and plugging this into either equation gives b= 25.

Thanks.

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

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25