Docsity

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

Partial preview of the text

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

Computer Security

Modern Stream Ciphers

Strength of Geffe Generator

  • A simple correlation attack is possible if we know the length Li of LFSRs

forall primitive connection polynomials of degree L1 do forall Initial states of the first LFSR do Compute 2L1 bits of output of the first LFSR Compute how many are equal to the output of the Geffe generator A large value signals that this is the correct choice of generator and starting state. end end Repeat the above for the third LFSR Recover the second LFSR by testing possible values using f(x1, x2, x3) = x1 · x2 ⊕ x2 · x3 ⊕ x3.

Strength of Geffe Generator

  • Is correlation attack a brute force attack?
  • Brute Force attack would require N combinations to try where  N = Possible Polynomials x Possible initial state of each Polynomial  Possible Polynomials

 Possible Initial States

 Possible Polynomials = N =  How many attempts would be required by correlation attack?

Shrinking Generator

  • Two LFSRs with output sequence x1 and x
  • The idea is to throw away some of the x2 stream under the control of the x1 stream
  • The generator does not produce a bit on each iteration

Shrinking Generator

  • Period
  • Complexity
  • Does polynomial need to be relative prime?  Yes  Why?

A5/1Design

A5/1Generator

  • Majority bit operation  The ith LFSR is clocked if the majority bit is equal to the bit ci

RC4 Basics

  • A symmetric key encryption algo.

 Invented by Ron Rivest.

  • Normally uses 64 bit and 128 bit key sizes.
  • Most popular implementation is in WEP for 802.11 wireless networks and in SSL.
  • Cryptographically very strong yet very easy to implement.
  • Consists of 2 parts:

 Key Scheduling Algorithm (KSA)  Pseudo-Random Generation Algorithm

RC4 Basics

  • Key

 Values of 64 bit key are selected by users  Same key is used for encryption and decryption

  • Key Scheduling Algorithm

 It is an algorithm that calculates the subkeys given a key  Each subkey is used at a particular stage of encryption (round)  Key scheduling algorithms are usually used in ciphers that perform encryption in rounds or stages.

RC4 Algorithm

  • Select a key K
  • Initialize an array of 256 bytes. S
  • Run the KSA on them (on S) (Permuted S)
  • Run the PRGA on the KSA output to generate keystream.
  • XOR the data with the keystream.

Array Initialization

Initialize the array S from 0 to 255

Code for Array Initialization int S[256];

int i;

for(i=0; i< 256; i++) S[i] = i; After this the array would like this :

S[] = { 0,1,2,3, ……, 254, 255}

The PRGA

  • The KSA scrambled S[256] array is used to generate the PRGA. This is the actual keystream. C Code: i = j = 0; while(output_bytes) { i = ( i + 1) % 256; j = ( j + S[i] ) % 256; swap( S[i], S[j] ); output = S[ ( S[i] + S[j] ) % 256 ] }

Encryption using RC

  • Choose a secret key
  • Run the KSA and PRGA using the key to generate a keystream.
  • XOR keystream with the data to generated encrypted stream.
  • Transmit Encrypted stream.