LECTURE NOTES ON By Dr. Samaher Hussein Ali

advertisement

Department of Software

The University of Babylon

LECTURE NOTES ON

Steam Cipher

System

By

Dr. Samaher Hussein Ali

College of Information Technology, University of Babylon, Iraq

[email protected]

10/24/2012

Stream Cipher System

ki

Key Generator

Letter

Plain Text Binary

Sequence Generator

Pi

Feedback Shift

Register( Linear or non Linear Function)

Ci

Binary Sequence of cipher text

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)

10/24/2012

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 X2 Output

0 0 0

1 0 1

0 1 1

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

C0=1

0

C1=0

+

1

C2=1

0

C3=1

S0

S1

S2

10/24/2012

Dr. Samaher Hussein Ali

Notes of Lecture 6

Stream Cipher System

Max Length of Key= 2

3

− 1

No

= 7

FB

1

2

3

4

5

6

7

1

1

0

0

1

0

1

1

0

0

1

S0 S1

0 1

1 0

1

1

1

0

0

0 1

Key = 0101110

0

1

1

1

0

S2

0

1

0

Output

0

1

0

1

1

1

0

10/24/2012

Dr. Samaher Hussein Ali

Notes of Lecture 6

Stream Cipher System

1

4

2

Initial State

5

7- States

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 110 0 1011 10 01

10/24/2012

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

C0=1

1

S0

C1=0

0

S1

C2=0

+

1

S2

C3=1

0

S3

C4=1

Max Length of Key= 2

4

1

= 15

No FB S1 S2 Output

1

2

3

4

5

6

1

1

0

0

0

1

S0

1

1

0

0

1

1

0

1

1

1

1

0

0

0

1

1

1

1

0

0

1

1

1

1

S3

0

1 0

1

0

1

1

1

10/24/2012

Dr. Samaher Hussein Ali

Notes of Lecture 6

Stream Cipher System

12

13

14

15

9

10

11

No

7

8

FB

0

1

0

1

1

0

1

1

0

S0

1

0

1

0

1

0

0

1

1

S1

0

1

0

1

0

1

0

0

1

Key = 01011 11000 10011

Message = Happy New Year

H= 8= 1000

r= 18 = 1010

10/24/2012

Dr. Samaher Hussein Ali

S2

0

1

1

0

1

0

1

0

0

S3

0

0

1

1

0

0

0

1

0

Output

1

0

0

1

1

0

0

0

1

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

10/24/2012

Dr. Samaher Hussein Ali

Notes of Lecture 6

Stream Cipher System (

Nonlinear Feedback Shift Register “NLFSR “

)

and linear complexity

Figure

2

: The Geffe generator.

10/24/2012

Dr. Samaher Hussein Ali

Notes of Lecture 6

Stream Cipher System (

Nonlinear Feedback Shift Register

)

Logic of AND

X1 X2 Output

0 0 0

1 0 0

0 1 0

1 1 1

Logic of OR

X1 X2 Output

0 0 0

1 0 1

0 1 1

1 1 1

LFBSR1

X1

Nonlinear Function

X2

LFBSR2

10/24/2012

Dr. Samaher Hussein Ali

Notes of Lecture 6

Stream Cipher System (

Nonlinear Feedback Shift Register

)

+

C3=1

1

S3

C2=0

0

S2

C1=1

1

S0

C0=1

X1

C4=1

1

S3

C3=1

1

S2

C2=0

+

1

S1

C1=0

0

S0

C0=1

X2

AND

O/P

10/24/2012

Dr. Samaher Hussein Ali

Notes of Lecture 6

3

4

1

2

5

6

7

10

11

8

9

Stream Cipher System (

Nonlinear Feedback Shift Register “NLFSR “

)

No

1

1

0

1

0

1

0

FB

1

0

1

1

1

S2

1

0

0

1

1

0

0

1

S1

0

1

0

1

1

1

0

0

S0

1

0

1

0/P FB

1

0

1

0

0

1

1

1

0

1

0

0

1

0

1

1

0

0

0

0

1

0

1

1

0

1

0

0

0

0

1

S3

1

1

0

0

1

1

0

1

1

0

0

0

S2

1

1

1

1

0

1

1

0

0

1

1

0

S1

1

1

1

0

1

0

1

1

0

0

1

1

S0

0

1

1

O/P

1

1

0

1

1

0

1

1

0

0

1

Output

0

0

0

0

1

0

1

1

0

0

0

10/24/2012

Dr. Samaher Hussein Ali

Notes of Lecture 6

Stream Cipher System (

Nonlinear Feedback Shift Register “NLFSR “

)

S1 No

12

13

14

15

FB S2 S0 0/P

0

1

1

1

FB

1

1

1

1

1

1

S3

0

0

1

1

S2

0

0

0

1

S1

0

0

0

0

S0

1

O/P

0

1

0

0

Output

0

1

0

0

Key = 00001 01001 00100

10/24/2012

Dr. Samaher Hussein Ali

Notes of Lecture 6

Download