LECTURE NOTES ON By Dr. Samaher Hussein Ali

advertisement
The University of Babylon
Department of Software
LECTURE NOTES ON Steam Cipher
System
By
Dr. Samaher Hussein Ali
College of Information Technology, University of Babylon, Iraq
Samaher@itnet.uobabylon.edu.iq
19 October 2013
Stream Cipher System
ki
Key Generator
Feedback Shift
Register( Linear or
non Linear Function)
Letter
Plain Text Binary
Sequence Generator
Ci
Binary Sequence of cipher text
Pi
Key Generator:
is part of stream cipher system that is responsible on generating of a long random sequence of binary key that used in
ciphering and deciphering process
Feedback Shift Register
used the Linear or Non-linear functions to mix the plain text with the key
1. Linear Feedback Shift Register (XOR)
2. Nonlinear Feedback Shift Register (And , Or)
19 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 6
Stream Cipher System
𝑛
Max Length of Key=2− 1
where
n number of state
𝑛
Number of Correct Connection=
𝜙(2− 1 )
𝑛
Logic of XOR
X1
0
1
0
1
X2
0
0
1
1
Output
0
1
1
0
Example:
Let the initial State of Sift Register is {0, 1, 0} and Feed Back coefficient 1011 find States, then cipher the massage
GOOD
+
C3=1
0
C0=1
19 October 2013
C2=1
C1=0
S0
0
1
S1
Dr. Samaher Hussein Ali
S2
Notes of Lecture 6
Stream Cipher System
3
Max Length of Key=2− 1 = 7
No
FB
S0
S1
S2
0
1
0
Output
1
1
1
0
1
0
2
1
1
1
0
1
3
0
1
1
1
0
4
0
0
1
1
1
5
1
0
0
1
1
6
0
1
0
0
1
0
1
0
0
7
Key = 0101110
19 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 6
Stream Cipher System
Initial State
2
4
5
7- States
1
6
3
7
Message = GOOD
G= 7= 0111
O= 15=1111
O= 15= 1111
D= 4 = 0100
PLAIN TEXT = 0111 1111 1111 0100
KEY
= 0101 1100 1011 1001
19 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 6
Stream Cipher System
Example:
Let the initial State of Sift Register is {1,0, 1, 0} and Feed Back coefficient 10011 find States, then cipher the massage
Happy New Year
+
C4=1
1
0
C0=1
0
1
C3=1
C2=0
C1=0
S0
S1
S3
S2
4
Max Length of Key=2− 1 = 15
No
FB
S0
S1
S2
S3
1
0
1
0
Output
1
1
1
1
0
1
0
2
1
1
1
1
0
1
3
0
1
1
1
1
0
4
0
0
1
1
1
1
5
0
0
0
1
1
1
6
1
0
0
0
1
1
19 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 6
Stream Cipher System
No
FB
S0
S1
S2
S3
Output
7
0
1
0
0
0
1
8
0
0
1
0
0
0
9
1
0
0
1
0
0
10
1
1
0
0
1
0
11
0
1
1
0
0
1
12
1
0
1
1
0
0
13
0
1
0
1
1
0
14
1
0
1
0
1
1
15
1
1
0
1
0
1
Key = 01011 11000 10011
Message = Happy New Year
H= 8= 1000
…
…
r= 18 = 1010
19 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 6
Stream Cipher System ( Nonlinear Feedback Shift Register )
One general technique for destroying the linearity inherent in LFSRs is to use several LFSRs in parallel. The keystream is
generated as a nonlinear function F of the outputs of the component LFSRs; this construction is illustrated in Figure 1. Such
keystream generators are called nonlinear combination generators, and F is called the combining function. The remainder of
this subsection demonstrates that the function F must satisfy several criteria in order to withstand certain particular
cryptographic attacks.
Figure 1: A nonlinear combination generator. F is a nonlinear combining function.
(Geffe Generator) The Geffe generator, as depicted in Figure 2, is defined by three maximum-length LFSRs whose lengths
L1,L2, and L3 are pairwise relatively prime, with nonlinear combining function
The keystream generated has period
19 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 6
Stream Cipher System ( Nonlinear Feedback Shift Register “NLFSR “)
and linear complexity
Figure 2: The Geffe generator.
19 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 6
Stream Cipher System ( Nonlinear Feedback Shift Register )
Logic of AND
X1
0
1
0
1
X2
0
0
1
1
Output
0
0
0
1
X1
0
1
0
1
X2
0
0
1
1
Output
0
1
1
1
Logic of OR
LFBSR1
X1
Nonlinear Function
X2
LFBSR2
19 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 6
Stream Cipher System ( Nonlinear Feedback Shift Register )
+
1
1
0
C3=1
S3
X1
C0=1
C1=1
C2=0
S0
S2
AND
O/P
X2
+
1
1
C4=1
0
1
C0=1
C1=0
C2=0
C3=1
S3
19 October 2013
S2
S1
Dr. Samaher Hussein Ali
S0
Notes of Lecture 6
Stream Cipher System ( Nonlinear Feedback Shift Register “NLFSR “)
No
FB
S2
S1
S0
1
0
1
0/P
FB
S3
S2
S1
S0
1
1
1
0
O/P
Output
1
0
0
1
0
1
0
1
1
1
1
0
0
2
1
0
0
1
0
1
0
1
1
1
1
0
3
1
1
0
0
1
0
1
0
1
1
1
0
4
1
1
1
0
0
1
0
1
0
1
1
0
5
0
1
1
1
0
1
1
0
1
0
1
1
6
1
0
1
1
1
0
1
1
0
1
0
0
7
0
1
0
1
1
0
0
1
1
0
1
1
8
1
1
0
0
1
1
0
0
9
0
0
1
0
0
1
1
0
10
1
0
0
1
0
0
1
1
11
0
0
0
0
1
0
0
0
19 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 6
Stream Cipher System ( Nonlinear Feedback Shift Register “NLFSR “)
No
FB
S2
S1
S0
0/P
FB
S3
S2
S1
S0
O/P
Output
12
0
1
0
0
0
1
0
0
13
1
1
1
0
0
0
1
1
14
1
1
1
1
0
0
0
0
15
1
1
1
1
0
0
0
Key = 00001 01001 00100
19 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 6
Download