This action might not be possible to undo. Are you sure you want to continue?

BooksAudiobooksComicsSheet Music### Categories

### Categories

### Categories

### Publishers

Scribd Selects Books

Hand-picked favorites from

our editors

our editors

Scribd Selects Audiobooks

Hand-picked favorites from

our editors

our editors

Scribd Selects Comics

Hand-picked favorites from

our editors

our editors

Scribd Selects Sheet Music

Hand-picked favorites from

our editors

our editors

Top Books

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Audiobooks

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Comics

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Sheet Music

What's trending, bestsellers,

award-winners & more

award-winners & more

P. 1

RC4 Encryption Algorithm |Views: 54|Likes: 0

Published by ahmed

RC4 Encryption Algorithm with explained example

RC4 Encryption Algorithm with explained example

See more

See less

https://www.scribd.com/doc/139428252/RC4-Encryption-Algorithm

07/22/2013

text

original

By: Ahmed Loqman Yousify

**Computer Science Department
**

University Of Zakho

Overview

History

**Discussion of RC4 Algorithm Analysis of RC4 Example
**

Weaknesses of RC4

History

RC4 was designed by Ron Rivest of RSA Security in 1987. While it is officially termed “Rivest Cipher 4”.

RC4 was initially a trade secret, but in September 1994 a description of it was anonymously posted to the Cypherpunks mailing list.

and from there to many sites on the Internet. RC4 has become part of some commonly used encryption protocols and standards, including WEP and WPA for wireless cards. The main factors in RC4's success over such a wide range of applications are its speed and simplicity: efficient implementations in both software and hardware are very easy to develop.

Analysis of RC4

Advantages

Faster than DES Enormous key space (average of 1700 bits) RC4 is used in popular protocols such as Secure Sockets Layer (SSL) (to protect Internet traffic) SSL and In 802.11 WEP(to secure wireless networks).

Disadvantages

Large number of “weak” keys 1 of 256 “Weak” keys can be detected and exploited with a high probability

Weaknesses of RC4

Almost all weaknesses are in the KSA since attacking the PRGA is fairly infeasible due to the huge effective key. The fastest known method requires 2700 time. The KSA can be attacked with several methods mainly because of the simple initialization permutation used.

**Invariance Weakness is the most devastating attack.
**

(5% chance of guessing one or more bytes of the key.)

RC4 Description

Symmetric

Stream Cipher

Two main parts:

KSA (Key Scheduling Algorithm)

**PRGA (Pseudo Random Generation Algorithm) Notation:
**

**S = {0, 1, 2, … N-1} is the initial permutation l = length of
**

RC4 Description

Encryption

Decryption

RC4 Example

Simple 4-byte example

S = {0, 1, 2, 3}

K = {1, 7, 1, 7} Set i = j = 0

KSA

S[0]

K = {1, 7, 1, 7}

K[0]

**First Iteration (i = 0, j = 0, S = {0, 1, 2, 3}): j = (j + S[ i ] + K[ i ]) = (0 + 0 + 1) = 1 Swap S[ i ] with S[ j ]: S = {1, 0, 2, 3} Second Iteration (i = 1, j = 1, S = {1, 0, 2, 3}):
**

S[i] S = {0,1, 2, 3} S[j]

j = (j + S[ i ] + K[ i ]) = (1 + 0 + 7) = 0 (mod 4)

Swap S[ i ] with S[ j ]: S = {0, 1, 2, 3}

KSA

S[0]

K = {1, 7, 1, 7}

K[0]

**First Iteration (i = 0, j = 0, S = {0, 1, 2, 3}): j = (j + S[ i ] + K[ i ]) = (0 + 0 + 1) = 1 Swap S[ i ] with S[ j ]: S = {1, 0, 2, 3} Second Iteration (i = 1, j = 1, S = {1, 0, 2, 3}):
**

S[i] 1 S = {0 ,1 , 2, 3} 0 S[j]

j = (j + S[ i ] + K[ i ]) = (1 + 0 + 7) = 0 (mod 4)

Swap S[ i ] with S[ j ]: S = {0, 1, 2, 3}

KSA

S[0]

K = {1, 7, 1, 7}

K[0]

**First Iteration (i = 0, j = 0, S = {0, 1, 2, 3}): j = (j + S[ i ] + K[ i ]) = (0 + 0 + 1) = 1 Swap S[ i ] with S[ j ]: S = {1, 0, 2, 3} Second Iteration (i = 1, j = 1, S = {1, 0, 2, 3}):
**

1 S = { 1, 0 , 2, 3} 0

j = (j + S[ i ] + K[ i ]) = (1 + 0 + 7) = 0 (mod 4)

Swap S[ i ] with S[ j ]: S = {0, 1, 2, 3}

KSA

First Iteration (i = 0, j = 0, S = {0, 1, 2, 3}): j = (j + S[ i ] + K[ i ]) = (0 + 0 + 1) = 1 Swap S[ i ] with S[ j ]: S = {1, 0, 2, 3}

S[1]

K = {1, 7, 1, 7}

K[1]

Second Iteration (i = 1, j = 1, S = {1, 0, 2, 3}):

j = (j + S[ i ] + K[ i ]) = (1 + 0 + 7) = 0 (mod 4)

Swap S[ i ] with S[ j ]: S = {0, 1, 2, 3}

KSA

S[2]

K = {1, 7, 1, 7}

K[2]

Third Iteration (i = 2, j = 0, S = {0, 1, 2, 3}): j = (j + S[ i ] + K[ i ]) = (0 + 2 + 1) = 3 Swap S[ i ] with S[ j ]: S = {0, 1, 3, 2} Fourth Iteration (i = 3, j = 3, S = {0, 1, 3, 2}):

j = (j + S[ i ] + K[ i ]) = (3 + 2 + 7) = 0 (mod 4)

Swap S[ i ] with S[ j ]: S = {2, 1, 3, 0}

KSA

Third Iteration (i = 2, j = 0, S = {0, 1, 2, 3}): j = (j + S[ i ] + K[ i ]) = (0 + 2 + 1) = 3 Swap S[ i ] with S[ j ]: S = {0, 1, 3, 2}

S[3]

K = {1, 7, 1, 7}

K[3]

Fourth Iteration (i = 3, j = 3, S = {0, 1, 3, 2}):

j = (j + S[ i ] + K[ i ]) = (3 + 2 + 7) = 0 (mod 4)

Swap S[ i ] with S[ j ]: S = {2, 1, 3, 0}

PRGA

For this example we use plaintext “HI”

Reset i = j = 0, Recall S = {2, 1, 3, 0}

i=i+1=1 j = j + S[ i ] = 0 + 1 = 1 Swap S[ i ] and S[ j ]: S = {2, 1, 3, 0} Output z = S[ S[ i ] + S[ j ] ] = S[2] = 3 Z = 3 ( 0000 0011 ) H

0100 1000

XOR 0000 0011 0100 1011

i=1 , j=1 , S = {2, 1, 3, 0} i=i+1=2

j = j + S[ i ] = 1 + 3 = 4 (mod 4) = 0

Swap S[ i ] and S[ j ]: S = {3, 1, 2, 0} Output z = S[ S[ i ] + S[ j ] ] = S[1] = 1

Z = 3 ( 0000 0001 )

I 0100 1001 XOR 0000 0001

0100 1000

Result : Plaint Text : 0100 1000 0100 1001 Cipher Text: 0100 1011 0100 1000

Resources

Fluhrer, Mantin, Shamir - Weakness in the Key Scheduling Algorithm of RC4.

http://www.drizzle.com/~aboba/IEEE/rc4_ksaproc.pdf

**Stubblefield, Loannidis, Rubin – Using the Fluhrer, Mantin, and Shamir Attack to Break WEP.
**

http://www.cs.rice.edu/~astubble/wep/wep_attack.pdf

**Rivest – RSA Security Response to Weakness in the Key Scheduling Algorithm of RC4.
**

http://www.rsasecurity.com/rsalabs/technotes/wep.html

RC4 Encryption Algorithm.

http://www.ncat.edu/~grogans/algorithm_breakdown.htm

اسباني

علم الفلك للمبتدئين

كتاب استمتع بحياتك

Computer Organization

Practica Astronomy

العقل وقواه الادراكية وعلاقته بالحواس

dda code

lcd vs fpd

Vigen Ere

Block Cipher

s-idea

Great DFA Examples

Great DFA Examples.pdf

Welcome to the Installation of Linux Ubuntu On VirtualBox without using CD

HTML by Ahmed L.yousify

Computer Generations

Ascii Table

Network Topologies

- Read and print without ads
- Download to keep your version
- Edit, email or read offline

International Organization of Scienti...

IOSR Journal of Computer Engineering (IOSR-JCE) vol.16 issue.2 version.12

International Journal of Information ...

Samir El Adib and Naoufal Raissouni National School for Applied Sciences of ...

Efficient Public Key Homomorphic Encryption Over Integer Plaintexts

RSA Encryption Algorithm in a Nut Shell

Secured Cloud Information Accountability for Data Sharing Using Identity Based Encryption Algorithm

Scalable Encryption Algorithm

Des Des encryption algorithm explanation

AES Encryption Algorithm Hardware Implementation Architecture

Digital Signatures and Public Key Encryption

Tiny Encryption Algorithm (TEA) for the Compact Framework

The RC5 Encryption Algorithm

RSA Public Key Encryption Algorithm

Public Key Encryption and Digital Signature and How They Work

3. DES (Data Encryption Standard) Algorithm.doc

09-PublicKeyEncryption

Public Key Encryption

A Study of Blowfish Encryption Algorithm

Public Key Encryption

Public Key Encryption

Module Public Key Encryption RSA

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

CANCEL

OK

You've been reading!

NO, THANKS

OK

scribd

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->