Computer Network laboratory
RC4 Encryption Algorithm
CN@Lab
Outline
Description
Algorithm
Example
¾ Key Setup
¾ Ciphering
CN@Lab
Description
stream cipher symmetric key
Use two array, state and key
1. 256-byte state table.
State[256]=[ 0 .. 255 ]
2. It has the capability of using keys between 1
and 2048 bits.
Key[1..2048] = [ ……. ]
Hint. WEP use 40 bits
CN@Lab
Algorithm
* Two phases
Key Setup
1. f = ( f + S
i
+ K
g
) mod 4
2. Swapping S
i
with S
f
Ciphering ( XOR)
1. i = ( i + 1 ) mod 4 , and f = ( f + S
i
) mod 4
2. Swaping S
i
with S
f
3. t = ( S
i
+ S
f
) mod 4
Random byte S
t
评论0