WEP encryption uses the RC4 symmetric stream cipher algorithm with 40-bit and 104-bit encryption keys. 104-bit keys are not standard, but many wireless AP vendors support them.
An encrypted frame is produced as follows:
- A 24-bit integrity check value (ICV) is calculated to provide data integrity for the MAC frame.
- The ICV is appended to the end of the frame data.
- A 24-bit initialisation vector (IV) is appended to the WEP encryption key.
- The combination of [IV+WEP encryption key] is used as the input to a pseudo-random number generator (PRNG) to generate a bit sequence the same size as the combination of [data+ICV].
- The PRNG bit sequence, also known as the key stream, is bit-wise exclusive ORed (XORed) with [data+ICV] to produce the encrypted portion of the payload sent between the wireless AP and the wireless client.
- The IV is prepended to the encrypted [data+ICV] to create the payload for the wireless MAC frame. The result is IV+encrypted [data+ICV].
Next: Wireless MAC Payload