Docsity

Modern Stream Ciphers Part 4-Computer Security-Lecture Slides, Slides of Computer Security

Toggle sidebar
bg1
Computer Security
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download Modern Stream Ciphers Part 4-Computer Security-Lecture Slides and more Slides Computer Security in PDF only on Docsity!

Computer Security

Modern Stream Ciphers

LFSR

• If we could find a connection polynomial that is primitive than we can

have certain properties in our binary bit stream

• GF(2) : Galois Field (2) ; [0,1] is a field

• Primitive Polynomial

 If coefficients of polynomial X are from GF(2)

 Their exist p(x) (a prime polynomial) which can generate GF(2n) i.e. all non-zero members of the polynomial

 Operations are under modulo a prime polynomial p(x)

• For example, x^4 + x + 1 is primitive. So  = x is a primitive element and

successive powers of  will generate all non-zero elements of GF(16)

5

Galois Fields – Primitives

^0 = 1

^1 = x

^2 = x^2

^3 = x^3

^4 = x + 1

^5 = x^2 + x

^6 = x^3 + x^2

^7 = x^3 + x + 1

^8 = x^2 + 1

^9 = x^3 + x

^10 = x^2 + x + 1

^11 = x^3 + x^2 + x

^12 = x^3 + x^2 + x + 1

^13 = x^3 + x^2 + 1

^14 = x^3 + 1

^15 = 1

  • Note this pattern of coefficients matches the bits from our 4-bit LFSR example.
  • In general finding primitive polynomials is difficult. Most people just look them up in a table, such as: - ^4 = x^4 mod x^4 + x + 1 - = x^4 xor x^4 + x + 1 - = x + 1

Slide from David Culler’s Lecture Electrical Engineering and Computer Sciences University of California, Berkeley

States of LFSR

• Each state of the linear feedback shift register can be obtained from the

previous state via a matrix multiplication M and S

• States vector s = (s1, s2,... , sL)

 Where L is the length of the LFSR, CL is Lth^ coefficient of the polynomial Si is the state of ith^ bit of LFSR

• Then the next state can be deduced by computing

s = M · s

Example-

• C(X) = X3 + X + 1.

• deg(C) 6 != L

• S 5 = (0, 1, 0, 1)

. = = S 10

Transitions of the four bit LFSR with connection polynomial X3 + X + 1

Example-

• Polynomial

• Matrix

Transitions of the four bit LFSR with connection polynomial X^4 +X^3 +X^2 + X + 1

It is purely periodic and all periods have

same length

Examle-

• Polynomial

• Matrix

Transitions of the four bit LFSR with connection polynomial X^4 + X + 1

Non-Linear LFSR

  • Operation of register states and coefficients

 Register Length L  Register states (state of each cell) S 0 S 1 S 2 … SL  Set of coefficients : A set of bits [c 1 ,... , cL] which are set to one if that cell is tapped and set to zero otherwise  Output sequence

 The jth^ output bit can also be written as

Security of single LFSR

• The system of equations can be written as

• It can be solved to find [c 1 ,... , cL]

• So it is possible to determine the connection polynomial

• How it can happen in real world?

 Known plain text-cipher text attack

Complexity of LFSR

• Complexity of a continuous bits stream

• (Linear complexity). For an infinite binary sequence

s = s0, s1, s2, s3,... ,

• we define the linear complexity of s as L(s) where

 L(s) = 0 if s is the zero sequence,  L(s) = ∞ if no LFSR generates s,L(s) will be the length of the shortest LFSR to generate s

• Complexity of LFSR

 Based of shifting function which is linear , the complexity is also linear  What it could be?

 Does our LFSR generates a random bit stream?

 No

Complexity

• A simple output sequence can be

• But it can be different

• Linear Complexity is given by

 For n LFSRs of maximal length with periods L1,... ,Ln and

which are all distinct and greater than two.

 The linear complexity of the keystream generated by f(x 1 ,...

, xn) is equal to f(L 1 ,... ,Ln)

• Is it true that a non-linear function with huge linear complexity

would be strong?

 Lets See

Example

• Geffe generator.

• This generator takes three LFSRs of maximal period and distinct sizes,

L1,L2 and L3,

• It combines them using the non-linear function, of non-linear order 2,

• z = f(x 1 , x 2 , x 3 ) = x 1 · x 2 ⊕ x 2 · x 3 ⊕ x3.

It’s linear complexity is given by

• L 1 · L 2 + L 2 · L 3 + L 3

and it’s period is given by

• (2L1^ − 1)(2L2^ − 1)(2L3^ − 1).

• It can be seen that