IMT4531 Introduction to Cryptology Exercise 2 – Stream ciphers

advertisement
IMT4531 Introduction to Cryptology
Exercise 2 – Stream ciphers
1. Calculate the value of the autocorrelation function:
a) for a binary sequence of length 15, NOT produced by an LFSR of length 4 with a primitive
feedback polynomial: S=100011011010011, T=15. Find AC(0), AC(2), AC(5), AC(14).
b) for a binary sequence of length 15, produced by an LFSR of length 4 with a primitive
feedback polynomial f(x)=1+x+x4, with the initial state 0101: S=110010001111010, T=15.
Find AC(0), AC(2), AC(5), AC(14).
a) S=100011011010011, T=15.
k=0
1 0 0 0 1 1 0 1 1 0
1 0 0 0 1 1 0 1 1 0
1 0 0 1
1 0 0 1
1
1
A=15, D=0
𝐴 − 𝐷 15 − 0
𝐴𝐶(0) =
=
=1
𝑇
15
k=2
1 0 0 0 1 1 0 1 1 0
0 0 1 1 0 1 1 0 1 0
1 0 0 1
0 1 1 1
1
0
A=5, D=10
𝐴 − 𝐷 5 − 10
1
𝐴𝐶(2) =
=
=−
𝑇
15
3
k=5
1 0 0 0 1 1 0 1 1 0
1 0 1 1 0 1 0 0 1 1
1 0 0 1
1 0 0 0
1
1
1 0 0 1
0 1 0 0
1
1
1 1 0 1
1 1 0 1
0
0
A=9, D=6
𝐴𝐶(5) =
𝐴−𝐷 9−6 1
=
=
𝑇
15
5
k=14
1 0 0 0 1 1 0 1 1 0
1 1 0 0 0 1 1 0 1 1
A=7, D=8
𝐴𝐶(14) =
𝐴−𝐷 7−8
1
=
=−
𝑇
15
15
b) S=110010001111010, T=15.
k=0
1 1 0 0 1 0 0 0 1 1
1 1 0 0 1 0 0 0 1 1
A=15, D=0
𝐴 − 𝐷 15 − 0
𝐴𝐶(0) =
=
=1
𝑇
15
k=2
1 1 0 0 1 0 0 0 1 1
0 0 1 0 0 0 1 1 1 1
1 1 0 1
0 1 0 1
0
1
1 1 0 1
1 1 0 0
0
1
1 1 0 1
1 1 1 0
0
1
A=7, D=8
𝐴𝐶(2) =
𝐴−𝐷 7−8
1
=
=−
𝑇
15
15
k=5
1 1 0 0 1 0 0 0 1 1
0 0 0 1 1 1 1 0 1 0
A=7, D=8
𝐴𝐶(5) =
𝐴−𝐷 7−8
1
=
=−
𝑇
15
15
k=14
1 1 0 0 1 0 0 0 1 1
0 1 1 0 0 1 0 0 0 1
A=7, D=8
𝐴𝐶(14) =
𝐴−𝐷 7−8
1
=
=−
𝑇
15
15
2. Check whether the DeBruijn’s diagram corresponding to the feedback function
𝑓(𝑥1 , 𝑥2 , 𝑥3 ) = 𝑥1 ⊕ 𝑥2 𝑥3 of a feedback shift register is singular.
𝑓(𝑥1 , 𝑥2 , 𝑥3 ) = 𝑥1 ⊕ 𝑥2 𝑥3
The DeBruijn’s diagram:
Thus the diagram / register is singular.
3. Find the characteristic polynomial of the linear recurring sequence
𝑎(𝑡) = 𝑎(𝑡 − 1) ⊕ 𝑎(𝑡 − 3) ⊕ 𝑎(𝑡 − 4)
The characteristic polynomial is:
𝑓(𝑥) = 1 + 𝑥 + 𝑥 3 + 𝑥 4
4. Determine all the cycles of the LFSR with the feedback polynomial
𝑓(𝑥) = 𝑥 4 + 𝑥 3 + 𝑥 2 + 𝑥 + 1 . What can we say about this feedback polynomial upon
generating all the cycles?
The cycles:
0000
0001
1000
1100
0110
0011
0001
0010
1001
0100
1010
0101
0010
0111
1011
1101
1110
1111
0111
Since the lengths of all the cycles that do not contain the all-zero state of the LFSR are equal
to 5 and 5 divides 24-1, we can conclude that the feedback polynomial is irreducible.
5. Determine all the cycles of the LFSR with the feedback polynomial
𝑓(𝑥) = 𝑥 5 + 𝑥 4 + 1 . What can we say about this feedback polynomial upon generating all
the cycles?
The cycles:
00000
00001
10000
01000
00100
00010
10001
11000
01100
00110
10011
01001
10100
01010
10101
11010
11101
11110
11111
01111
00111
00011
00001
00101
10010
11001
11100
01110
10111
01011
00101
01101
10110
11011
01101
Since the lengths of all the cycles that do not contain the all-zero state of the LFSR are not
equal, we can conclude that the feedback polynomial is reducible.
Download