The WEP Encapsulation is shown pictorially below
Fig Courtesy: 802.11 Standard
The WEP encryption algorithm is ARC4 stream cipher provided by RSA Security Inc. The ARC4 cipher uses a pseudo-random number generator (PRNG) to generate a key-stream. This Key-stream is exclusive OR’ed with the plain text data to obtain the encrypted text. The exclusive OR operation on the cipher text with the same key-stream recovers the plain-text data.
The WEP Key and the initialization vector are concatenated to create a WEP seed that is fed to ARC4 PRNG to create the key-stream. For the two lengths – the WEP seed is created as described below
- WEP-64 – bits 0–39 of the WEP key correspond to bits 24–63 of the WEP seed, and bits 0–23 of the IV correspond to bits 0–23 of the seed
- WEP-128 – bits 0–103 of the WEP key correspond to bits 24–127 of the WEP seed, and bit 0–23 of the IV correspond to bits 0–23 of the seed
The ICV (Integrity Check Value) is computed on the plaintext data and appended to the plaintext data prior to encryption.