You are on page 1of 2

Cryptography & Information Security

CSCI 4905/6100

Assignment 4

Date Assigned: Fri. 18th Mar.

Spring 2016
Due Date: Mon. 4th Apr.

1. You tap into the network and observe the following sequence of bits in a message
going from Alice to Bob.

011011010101101001000010110110
010001000001011001011010110101
010100010110110111001110100111
110110111110110101010000101111

You know that the cryptosystem being used is an LFSR (Linear Feedback Shift
Register) based synchronous stream cipher. Besides, you also know that the
degree m of the linear recurrence being used in this stream cipher is 5. You also
know that Alice has a tendency to start her messages with hi. Assume that we
are using a 32-character alphabet with az corresponding to 025, blank=26,
?=27, !=28, .=29, =30, $=31 and encoding the number corresponding to each
character using 5 bits (in binary number system). Answer the following questions without resorting to brute force. Show all intermediate steps. Also, include
print outs of your program in the report. Note that the first four parts of the
question can be answered just by using paper and pencil without any need for
computer programs.
(a) What is the initialization vector used? (5 Pts.)
(b) What are the feedback coefficients of the LFSR? (10 Pts.)
(c) Write down the recurrence relation used. (5 Pts.)
(d) Draw the LFSR that implements the given stream cipher. (5 Pts.)
(e) Write a program in your favorite programming language to generate the
whole sequence and find out the complete message sent by Alice. (25 Pts.)
(f) Write a program in your favorite programming language to encrypt the
sentence stream ciphers are used in cell phones. using the same LFSR
and the bit pattern 01101as the initialization vector. Include the output
produced in your report. (25 Pts.)

2. Suppose a cryptosystem has P = {a, b, c}, C = {1, 2, 3, 4} and K = {K1 , K2 , K3 }.


The encryption rules are as follows:
a
1
2
3

K1
K2
K3

b
2
3
4

c
3
4
1

Suppose that P r(K = Ki ) = 1/3, 1 i 3, P r(x = a) = 1/2, P r(x = b) =


1/3, P r(x = c) = 1/6. Compute the probability distributions P r(y), P r(y|x)
and P r(x|y) where (x P, y C). (25 Pts.)
3. Suppose that S1 is a Hill cipher with a 3 3 encryption matrix, and S2 is a
Vigenere Cipher with keyword length m = 3. It can be shown that S1 S2 =
S2 S1 . Suppose that

1 7 8

M1 = 0 3 21 ,
0 11 4
and K1 = (12, 17, 2). Then e(M1 ,K1 ) is an encryption rule for the cryptosystem
S1 S2 . Find the key (K2 , M2 ) for the cryptosystem S2 S1 such that the two
encryption rules e(M1 ,K1 ) and e(K2 ,M2 ) are identical. (20 Pts.)

You might also like