You are on page 1of 1

COMPSCI 3IS3 - Assignment 1

The only accepted submission format is PDF. Do not overexplain your answers. When you
write pseudocode, do not write it in any specific programming language.

1. (40 points) Recall that in the one-time pad scheme a message m is xor-ed with a key k
of the same length, i.e., the cipher text corresponding to m is c = k ⊕ m.

(a) Would the encryption be insecure if the key k is used more than once? (explain)
(b) Consider the following key and binary messages:
k = 10010111001110100011
m1 = 10000000000000000011
m2 = 00000000010000000010
What information can you get about m1 and m2 from the ciphertexts
k ⊕ m1 = 00010111001110100000
k ⊕ m2 = 10010111011110100001

2. (50 points) Recall that a binary LFSR of length m is defined by a recurrence of the form
sm = a0 s0 + a1 s1 + · · · + am−1 sm−1 where a0 , . . . , am−1 are binary numbers. Suppose we
are given the following output stream of a binary LFSR of length 5, where the coefficients
a0 , . . . , a4 are kept secret.

01011100101110010111...

Use this stream to recover the coefficients a0 , . . . , a4 . To test your answer, see if your
LFSR generates the same stream.

3. (10 points) Let p be a prime number. An LFSR mod p is defined by a recurrence sm =


a0 s0 +a1 s1 +· · ·+am−1 sm−1 where the coefficients a0 , . . . , am−1 are from the set {0, . . . , p−
1}. Can your solution to Question 2 be extended to work for an LFSR mod p? (explain)

You might also like