In WEP, what do the 24-bit IV and the ICV in each frame do, and why is WEP retired?
answer
- a per-frame value
- sent in the clear
- key prefix plus shared key
- a checksum without a secret
- no key management either
basics
~20 sIn WEP each frame's RC4 key is a 24-bit IV, sent in the clear, followed by the shared key, and a CRC-32 ICV is appended. A small IV space repeats and a CRC cannot authenticate, so WEP is retired.
solid answer
~40 sWEP encrypts each data frame with RC4 under a per-frame key made of a 24-bit **IV** followed by the shared root key. The IV travels in the clear in the frame's 4-octet IV field, and only 2^24 values exist, so keystreams repeat and the construction was later shown to leak the root key to passive observers. The 4-octet **ICV** is a CRC-32 of the payload, encrypted with it; a CRC catches accidents but cannot authenticate anyone, so it is not integrity. WEP also has no replay protection and no key management. Longer keys do not repair this, so WEP was replaced by WPA with TKIP and then WPA2 with CCMP, and the operator's job is to find it and remove it.
go deeper
Say that WEP is retired, that its 24-bit IV is sent in the clear and prepended to the shared key, and that the CRC-based ICV is not integrity.
Explain how the IV and root key form the RC4 key, name the 4-octet IV and ICV fields, and say why a longer key does not help.
Tie each flaw to what it puts at risk, and point out that dynamic WEP and a hidden SSID leave the construction untouched.
Frame WEP as a retirement item with a bounded exposure, not a hardening exercise: there is nothing to tune.
## What WEP is Wired Equivalent Privacy is the original 802.11 protection for data frames. It uses the **RC4** stream cipher and **one static root key shared by every device** on the WLAN. NIST SP 800-97 notes that the standard itself specifies only a 40-bit key and that vendors offer non-standard extensions to longer keys, the 104-bit form among them. Nothing in the standard distributes, rotates or retires that key, so management is manual on every access point and client. ## How one frame is protected For each frame the sender picks a 24-bit **initialization vector (IV)**, prepends it to the root key, and uses the result as the RC4 key for that frame. The keystream is XORed with the payload and with a 4-octet **integrity check value (ICV)**, which is a CRC-32 of the payload. The IV is not secret: it is sent in the clear in the frame so the receiver can build the same RC4 key. | Piece | Size | Visible on the air? | |---|---|---| | IV field | 4 octets (a 24-bit IV plus a key index) | yes, in the clear | | Root key | 5 octets (WEP-40) or 13 octets (WEP-104) | never sent | | Per-frame RC4 key | IV followed by root key: 8 or 16 octets | derived, not sent | | ICV | 4 octets | encrypted with the payload | The Linux header names these as `IEEE80211_WEP_IV_LEN` (4), `IEEE80211_WEP_ICV_LEN` (4), `WLAN_KEY_LEN_WEP40` (5) and `WLAN_KEY_LEN_WEP104` (13), with cipher suite selectors 00-0F-AC:1 and 00-0F-AC:5. The marketing labels "64-bit" and "128-bit" count the IV, so the secret is 40 or 104 bits. ## Why this construction is retired 1. **The IV space is tiny.** There are 2^24 IV values. WEP does not say how the IV is chosen, and when two frames share an IV under the same root key they share a keystream. 2. **The IV is a known prefix of the RC4 key.** The 2001 Fluhrer, Mantin and Shamir paper showed that this use of RC4 is insecure for any key size and any IV size, so the root key can be recovered from traffic that was only observed. 3. **The ICV is not integrity.** A CRC-32 has no secret, and a stream cipher passes bit changes through unchanged, so encrypting it adds nothing (NIST SP 800-97, section 3.2.3). 4. **There is no replay protection and no key management.** Section 3.2.4 of the same guide says the cryptography has no counter or timestamp, and every device holds the same key, which also destroys accountability. ## What it puts at risk - **Confidentiality** of every frame on the SSID, for anyone who can receive the radio signal. - **Integrity** of what the receiver accepts, because the check is not keyed. - **Access control**, because whoever holds or recovers the single shared key can join as any device. ## What replaced it, and what the operator does WPA with TKIP was the interim retrofit for WEP-era hardware, and WPA2 with CCMP (AES) is the 802.11i design. The dates and the comparison belong to the material on the security generations. For the operator the rule is simple: - WEP is a flaw in the **design**, so every conforming product is affected and both the access points and the clients have to move to another generation. - There is **no WEP setting that makes it acceptable**: not a longer key, not a rotated key, not a hidden SSID. - hostapd's own `defconfig` describes WEP as an obsolete algorithm "not considered secure" that "should not be used for anything anymore", and since version 2.10 it is out of the default build. - Find every WEP SSID in the estate, contain what cannot be replaced, and retire the rest. ## Overhead and how it is noticed - WEP adds 8 octets to every protected frame (the 4-octet IV field and the 4-octet ICV); CCMP adds 16 (an 8-octet header and an 8-octet MIC). The extra size buys integrity and a packet number, which WEP does not have. - An access point's log does not by itself show that a WEP exposure is being used. The exposure is noticed as a **configuration or scan finding**: a security type of WEP in the access point configuration, or a weak-protocol report from a wireless IDPS or scanner. NIST SP 800-153 asks continuous monitoring to cover devices using weak WLAN protocols. ## Common slips - Blaming the short key alone: the flaw is in how the IV and key are combined, and a 104-bit key is affected too. - Treating the encrypted CRC as a message authentication code. - Treating "dynamic WEP" (per-user keys from 802.1X) as a fix: NIST notes it retains all the weaknesses inherent in WEP.
- Why does moving from a 40-bit to a 104-bit WEP key not repair the protocol?The flaw is the construction, not the key length. The 24-bit IV stays a short, clear prefix of the RC4 key, and the 2001 Fluhrer, Mantin and Shamir paper states its result holds for any key size and any modifier size, including the 24-bit IV and the 128-bit modifier of a proposed WEP2. NIST SP 800-97 says longer keys do not mitigate WEP's known flaws.
- Which parts of a WEP data frame can a passive listener read, and which are encrypted?The IV field is in the clear, as is the 802.11 header with its addresses. The payload and the 4-octet ICV are encrypted under the per-frame RC4 key. A listener therefore sees every IV, which is what makes the key prefix a known quantity.
- A vendor offers 802.1X with dynamic WEP keys as a stronger WEP; is it?It improves key distribution, because each user gets session keys derived from EAP, but NIST SP 800-97 says dynamic WEP retains all the weaknesses inherent in WEP. The RC4 construction, the 24-bit IV and the CRC-32 ICV are unchanged, so it is still a finding to retire.
- WEP is weak only because its key is short.
- A 128-bit WEP network is safe enough for low-risk devices.
- Encrypting the CRC-32 turns it into a message authentication code.
- The IV is a secret nonce that protects the root key.
- Rotating or hiding things around WEP makes it acceptable.