WEP (Wired Equivalent Privacy) is the original security algorithm of the IEEE 802.11 standard, introduced in 1997 to encrypt Wi-Fi traffic and control access to a wireless network with a shared static key. In Wi-Fi and wider networking practice, WEP is now regarded as completely broken: its key can be recovered in minutes with freely available tools, and it must not be used to protect any network.
WEP matters today mainly for historical and operational reasons. Its failures shaped the design of WPA, WPA2 and WPA3, and engineers still encounter it on legacy industrial devices, old printers and embedded equipment that cannot support anything newer.
How WEP encrypts wireless frames
WEP encrypts each data frame with the RC4 stream cipher, using a per-frame key built from a 24-bit initialization vector (IV) joined to the shared secret key. The IV is sent in clear text in the frame header, so the receiver can rebuild the same RC4 key stream and decrypt the payload.
- The sender computes a CRC-32 integrity check value (ICV) over the plaintext and appends it.
- It picks a 24-bit IV and concatenates it with the 40-bit or 104-bit secret key.
- RC4 turns this seed into a key stream, which is combined with the plaintext and ICV using XOR.
- The frame is transmitted with the IV in clear text and the encrypted payload behind it.
Access control relied on either open system authentication, in which any station could associate, or shared key authentication, a challenge-response exchange using the same key. Paradoxically, shared key authentication weakened security, because an eavesdropper could capture both the plaintext challenge and the encrypted response and derive key stream from them.
WEP key lengths and variants
WEP keys are described by marketing lengths that include the IV, which often confuses administrators. A device labeled 64-bit WEP actually uses a 40-bit secret, and 128-bit WEP uses a 104-bit secret. The following table shows the common variants.
| Variant | Secret key length | Key entry format | Practical security |
|---|---|---|---|
| 64-bit WEP | 40 bits plus 24-bit IV | 10 hexadecimal digits or 5 characters | Broken |
| 128-bit WEP | 104 bits plus 24-bit IV | 26 hexadecimal digits or 13 characters | Broken |
| 152-bit and 256-bit WEP | 128 or 232 bits plus 24-bit IV | Vendor-specific, not standardized | Broken |
Longer keys did not fix WEP, because its weaknesses lie in how the IV and RC4 are combined and in the integrity check, not in the key length. A 104-bit key is recovered by statistical attacks almost as easily as a 40-bit key once enough frames have been collected.
Why WEP is cryptographically broken
WEP fails because of several independent design flaws, each serious on its own. Together they allow an attacker to read traffic, inject forged frames and recover the key without any authorized access to the network.
| Flaw | Mechanism | Consequence |
|---|---|---|
| Short IV space | Only about 16.7 million possible IVs | IVs repeat quickly on a busy network |
| Weak RC4 key scheduling | Certain IVs leak information about key bytes | Statistical key recovery from captured frames |
| Linear CRC-32 checksum | Bit changes produce predictable ICV changes | Undetected modification of encrypted frames |
| No replay protection | No sequence counter on frames | Captured frames can be resent at will |
| Static shared key | One key for all users, rarely changed | One compromise exposes every station |
The decisive academic result was the Fluhrer, Mantin and Shamir attack of 2001, which exploited weak RC4 key scheduling. Later refinements, notably the PTW attack of 2007, cut the requirement to tens of thousands of frames. Because attackers can use ARP request replay to force an access point to generate traffic, a WEP key can typically be recovered in a few minutes, regardless of key length or password quality.
The integrity flaw is equally serious. Because CRC-32 is linear and is not keyed, an attacker can flip chosen bits in the ciphertext and correct the ICV without knowing the key. Techniques such as the chopchop attack use this to decrypt individual packets byte by byte.
WEP compared with later Wi-Fi security
Every later Wi-Fi security generation was designed to remove a specific WEP weakness. WPA with TKIP was an interim fix that ran on WEP-era hardware, WPA2 introduced strong AES-based encryption, and WPA3 added protection against offline password guessing.
| Protocol | Encryption | Integrity | Status |
|---|---|---|---|
| WEP | RC4 with static key | CRC-32, unkeyed | Deprecated and insecure |
| WPA (TKIP) | RC4 with per-packet key mixing | Michael message integrity code | Deprecated |
| WPA2 | AES-CCMP | Keyed CCMP integrity | Acceptable with a strong passphrase |
| WPA3 | AES-CCMP or AES-GCMP with SAE | Keyed integrity, management frame protection | Current recommendation |
The IEEE deprecated WEP in 2004 with the ratification of 802.11i, and the Wi-Fi Alliance no longer certifies new devices that rely on it. Modern standards such as Wi-Fi 6 and Wi-Fi 7 require WPA3 for certification, and many current operating systems refuse to join WEP networks or warn strongly before doing so.
Handling legacy WEP devices safely
The correct response to WEP is replacement or isolation, never acceptance. When a device cannot be upgraded, the risk must be contained so that a compromised WEP network gives an attacker nothing of value.
| Situation | Recommended action | Reason |
|---|---|---|
| Firmware update adds WPA2 | Update and disable WEP | Removes the weakness entirely |
| Device has an Ethernet port | Connect by cable instead | Avoids wireless exposure |
| Device must stay wireless | Isolate on a separate SSID and VLAN | Limits damage after key recovery |
| Device handles sensitive data | Replace the device | Isolation cannot protect the data itself |
- Never run WEP and WPA2 on the same network segment, because the weaker protocol defines the real security level.
- Do not treat MAC filtering or a hidden SSID as compensation; both are trivial to bypass.
- Use end-to-end encryption such as TLS or a VPN for any traffic that must cross an isolated WEP segment.
A plain-language summary
WEP was the first lock designed for Wi-Fi networks. The idea was to make wireless connections as private as a cable plugged into a wall. Unfortunately, the lock had serious design mistakes, and people soon learned how to pick it.
Today, anyone with a laptop and free software can open a WEP lock within minutes, no matter how long or clever the password is. That is why WEP is considered unsafe for any use. Modern routers offer WPA2 or WPA3 instead, and those are the settings to choose. If an old gadget only understands WEP, it is best to replace it or keep it on a separate network.
An example from practice
An IT consultant audits a small manufacturing plant and finds a WEP-protected wireless network used by six barcode scanners from the early 2000s. The same SSID also serves office laptops, which reach the accounting server. During the assessment, the consultant captures traffic from the parking lot and recovers the 104-bit key in under ten minutes, demonstrating that an outsider could reach the internal network.
Because the scanners cannot be upgraded, the consultant recommends a staged fix. The office laptops move to a new WPA3 network, while the scanners stay on a dedicated WEP SSID mapped to an isolated VLAN that can reach only the inventory application through a firewall rule. Within six months the plant replaces the scanners with WPA2-capable models and switches WEP off entirely, closing the last legacy gap on its wireless network.