Cryptography Reference
In-Depth Information
Initial Permutation of the State Vector
Set i = j = 0. Then execute the following.
1. Set j
j + S [ i ]+ K [ i (mod k )](mod 256).
2. SW ( S [ i ] ,S [ j ]). (Swap the components.)
3. Set i = i +1. If i
0(mod 256), go to step 1. Otherwise, terminate the
initial permutation.
After the initial permutation, the key K is discarded/destroyed since it is a
unique key to be used only once. Next, we describe the actual streaming.
Keystream Generation
Set i = j = 0. Then execute the following.
1. Set i
i + 1(mod 256).
2. Set j
j + S [ i ](mod 256).
3. SW ( S [ i ] ,S [ j ]).
4. If i
0(mod 256), go to step 1. Otherwise go to step 5.
5. Set KS
S [ S [ i ]+ S [ j ]](mod 256)].
Use KS to encipher/decipher the next byte of plaintext/ciphertext by ad-
dition modulo 2. Then go to the keystream generation to get the next key to
encipher/decipher the next plaintext/ciphertext byte, and continue until the
entire message is encrypted/decrypted.
Analysis and Summary
As we shall see in Chapter 10, RC4 is used for secure wireless transmission
(badly as it turned out, at first, but only because the keys for RC4 were gen-
erated and used improperly, so the RC4 cipher is not at fault, but rather the
implementation). In fact, RC4, as with all stream ciphers, is easily cryptana-
lyzed if the same input key is used more than once. Sometimes this problem can
be eradicated by “hashing” (which we will study in Chapter 4) the key with a
nonce each time it is used and sending the nonce along with the message. RC4
is used in the SSL/TLS (See Section 5.7) standard for communication between
Web browsers and servers. When RC4 is compared, in terms of speed, to block
ciphers, it wins hands down.
On a Pentium II, RC4 operates at 45 Mbps 3.11 whereas DES operates at 9
Mbps and triple DES at a mere 3 Mbps. Thus, using a CSPRNG will ensure
that a stream cipher is as secure as a block cipher, and, as with RC4, typically
much faster. This may explain the release in the mid-1990s, by Netscape, of
a browser with RC4 as its encryption function utilizing a 128-bit key, which is
typically employed today for much of the Internet tra0c in electronic commerce,
especially banking.
3.11 This means megabits per second where a megabit is 10 6 bits.
Search WWH ::




Custom Search