You are on page 1of 9

7- Stream Ciphers

Cryptanalysis

10 April 2018
Example:1

If you have a key sequence as follows:

1 1 0 1 0 0 1 1 1 0 1 0 0 1 1 1

Find the structure of the LFBSR used

Solution:

….. 0 1 0 0 1 1 1 Lmax = 7 L = (2^n)-1

7 = 2^n - 1 n=3
+

? ? ?
Example:
2
Find LFBSR that Generate the following Sequence:
111100010011010111100010011010111100010011010………

Solution:
1) Testing the sequence , we will find that after
(15) bits is repeated.
Then Lmax= 15 = (2^n) -1
16= 2^n
Then n= 4

1 1 1 1
2) Find the Primitive Polynomial Feed Back Function

N =4

No. of F.B. Functions = Euler (Lmax) /n


= Euler (15) / 4
= Euler (3 * 5) /4
=2*4/4

= 2 …. Primitive Polynomials
0=1+2+3+4 Y

=1+2+3 X
= 1 + 2 +4 X
= 2+ 3 + 4 X
= 1 +3 + 4 X Q) Find which 2
of these are the
= 1 +2 Y right ones
= 1 +3 Y
= 1 +4 Y
= 2 +3 Y
= 2 +4 Y
=3+4 Y
Example 3

For the following Two LFBSR Find the output sequence


+

A Selective O/P

1 0 1 Logic N

S
1 1 1 A
S
n FB s1 s2 s3 op n fb s1 s2 s3 op
+
0 0 1 0 1 0 0 1 1 1

1 0 0 1 0 1 1 1 0 1 1 1

2 1 0 0 1 0 2 0 1 0 1 1
A 1 1 0 0 1 0 1 3 0 0 0 0 1
3 1 1 0 0 1
S 0 0 1 0 1 1 1 4 1 0 0 1 0
4 1 1 1 0 0
N ? ? 0 ? 1 0 1 5 0 1 1 1 1 5 1 1 0 0 1

6 1 0 1 1 1 6 1 1 1 0 0

7 1 0 1 1 7 1 1 1 0
Example: 4 Cipher

Plain S0 S1 S2
+ 1 0 1 Plain
1 1 1 1 1 1 1 1 1 1
key +
+

n fb s1 s2 s3 op
0 1 1 0 1
1 0 1 1 0 1
2 0 0 1 1 0
3 0 0 0 1 0
4 1 0 0 0 0
5 0 1 0 0 1
6 1 0 1 0 0
7 1 1 0 1 1
8 0 1 1 0 1
9 0 0 1 1 0
10 0 0 1 0
Example: 5

Which system is more secure, and how ?

Feedback Primitive Polynomial

s7 s6 s5 s4 s3 s2 s1 Key1

x1
3 LFBSR Key2
F(x1,x2)
x2
4 LFBSR

Solution: Lmax1=7*2 =14 ;Lmax2=15*2=30; Lmax3=8

Total Sec 2 =L1*L2*L3= 3360

Total Sec 1 = 2413

You might also like