CS265: Cryptography & Network Security

Wired Equivalent Privacy (WEP) 

Date: April 5th 2004

Submitted to
Mark Stamp

By

                                                Kavitha Devireddy (00787060)
                                         Sapna Shankar (003720068)

Table of Contents

        Abstract
1.     Introduction          	                                                                                      3
2.     WEP Internals                                                                                                    3
3      Problems with WEP	                                                                                     4
        3.1   WEP drawbacks	                                                                                     4
        3.2   Various Attacks	                                                                                     5
4      Solutions for improving security of Wireless LAN	                         5
        4.1    New Standards for improving security of WLAN	                         6
              4.1.1	802.1X	                                                                                                 6
              4.1.2	802.11i	                                                                                     6
5	Conclusion	                                                                                                 7

Abstract
Wired Equivalent Privacy (WEP) protocol is part of 802.11 standards for wireless networks, which is used to protect link-layer communications from tampering and other attacks.  In this paper, we discuss about WEP, WEP Internals, Problems with WEP, possible attacks on WEP and solutions for improving security of wireless LAN.

1	Introduction
Nowadays notebook computers and mobile devices like PDAs are used by people at various places for computing. That’s why wireless network connectivity is becoming very important part of computing environments. Currently popular wireless network standard is 802.11. In this standard data is transmitted over radio waves where interception and tampering becomes easy for anyone with a radio. So, there is much requirement to employ additional mechanisms to protect communications.

WEP is short form for Wired Equivalent Privacy, a security protocol for wireless local area networks (WLANs) defined in the 802.11b standard. WEP is designed to provide the same level of security as that of a wired LAN. LANs are more secure than WLANs because LANs are connected by physical wires and their network will be inside a building that can be protected from unauthorized access.  WLANs, which are over radio waves, do not have the same advantage and they are more vulnerable to tampering. WEP provides security by encrypting data over radio waves so that it is protected as it is transmitted from one end point to another. WEP provides confidentiality and data integrity, and protects access to the network infrastructure by rejecting all unauthorized packets. 

2	WEP Internals
WEP uses a 40 bit length secret key shared between the communicators. The actual encryption/decryption process looks like this: 

Encryption
•	First the message data frame is checksummed. 
•	The checksum of the message is concatenated with original message to get the plain text. 
•	Plain text is encrypted using the RC4 algorithm. This generates a keystream as a function of the initialization vector (IV) and the secret key k.
•	XOR function is applied to the plain text and the keystream to get the cipher text.
•	The cipher text and the initialization vector (IV) are then transmitted via radio.

Decryption
•	The receiver recreates the keystream and XORs it with cipher text to get the initial plain text. 
•	This plain text is then divided into Message and checksum.
•	Checksum is then computed for the message and compared with the received checksum. 
•	If the checksum is not same as the received one, then the message has been changed during transmission. 
•	Using the transmitted IV and the shared key, decryption generates the keystream.
•	At last, the resultant keystream is XORed with the cipher text to obtain the message.

Graphically, the process looks like this [1]: 

Message		          CRC

Keystream=RC4(IV,k)

XOR

IV		Ciphertext       

Transmitted Data

Plaintext

                                           Fig. 1: Encrypted WEP frame

3	Problems with WEP
3.1	WEP drawbacks
•	Key management: WEP standard lacks good Key management. In WEP, same keys are used for prolonged time. So this bad key management leads to poor quality. Most wireless networks that use WEP must be programmed with the same WEP key; so synchronizing the change of keys is difficult. Also, the 802.11 standard does not specify any WEP key sizes other than 40 bits. 
•	IV reuse: For a given WEP key, for any key size, WEP's IV size of 24 bits provides less then 17 million different RC4 cipher streams. The encrypted packet is generated by XORing the RC4 keystream with the original packet. The encrypted packet is transmitted along with the clear IV (unencrypted IV). WEP uses the same IV for different data packets. For a busy network, this reuse of same IVs can occur frequently. An attacker can decrypt packets that were encrypted with the same IV, if the RC4 cipher stream for a given IV is found.
•	Inappropriate Integrity check: MD5 or SHA-1 algorithms are more suitable for cryptographic hash than CRC-32, which is used in WEP. Authentication messages are easily tampered in case of CRC-32.
3.2	Various Attacks
•	First case is passively attacking to decrypt traffic. Here all wireless traffic can be intercepted by a passive intruder, until an IV collision occurs. The attacker can obtain the XOR of the two-plaintext messages by XORing two packets that use the same IV. Since all pair wise XORs are known, the attacker can recover all the messages with same IV after recovering the entire plaintext for one of the messages. 
•	Second case is actively attacking to inject traffic. If the attacker knows plaintext of one encrypted message, the attacker can change the plaintext to the new message by calculating CRC-32 and doing bit flips on the original encrypted message. If the attacker sends the new packet to the access point, it will be accepted.
•	Third case is actively attacking from both ends. If the attacker guesses the headers of a packet, which includes destination IP address, the attacker can flip relevant bits to make the destination system to send the packet to self system and transmit it using some mobile station.
•	Fourth case is attacking using table of appropriate initialization vectors. Here the attacker can build table of IVs, if the plaintext for some packets are known. Once the table is built, the attacker can decrypt all packets that are sent over the wireless link.

4	Solutions for improving security of Wireless LAN 
WEP protocol as explained above is plagued by security flaws, which affects the security of wireless LAN networks.

The security flaws and the possible attacks explained above requires, multiple security mechanisms [4] to be implemented along with WEP, so that, if an attacker was able to exploit the flaws in WEP, other security measures will prevent the attack. For example the wireless network can be placed outside the firewall and a virtual private network can be used to access anything that is inside the firewall As an additional measure efficient key management techniques like using longer encryption keys, frequently changing the keys and assigning different key for each user in a network can be used.
Alternative encryption techniques like IPsec, an Internet standard for communication security, can be used instead of WEP.
4.1	New Standards for improving security of WLAN
Apart from the measures specified above for minimizing attack on a wireless LAN, we will look at the standardized solutions to improve the security of WLAN’s .
4.1.1	802.1X
The IEEE 802.1x standard provides authentication framework for 802 LAN’s(both wired and wireless LAN).It includes an authentication protocol EAP(Extensible Authentication Protocol) [5] which provides the authentication framework and responsible for interoperability. The 802.1x standard authenticates clients and access points to each other through a authentication server(I the case of wireless LAN’s strong mutual authentication is necessary).The standard solves the key reuse problem which plagued WEP by providing a mechanism for dynamic distribution of encryption keys[5] to wireless stations.
4.1.2	802.11i
802.11i was developed as a replacement for WEP. It is composed of two sections, the upper section, and the lower section that consists of strong encryption algorithms. The upper section [6] that is the 802.1x standard described above is responsible for user authentication and distribution of encryption keys. Two encryption algorithms are discussed, Temporal key integrity protocol (TKIP) and Counter mode with CBC-MAC (CCMP).

TKIP
TKIP is a temporary solution used to tackle the key reuse problem in WEP. It was called WEP2 earlier. The clients and the access points share a “temporal key “ [5] which is 128 bits. TKIP concatenates the temporal key with the MAC addresses of clients and adds a 128-bit initialization vector to generate the key stream used for encryption. This results in each station using different key streams for encryption.

As with WEP, TKIP uses RC4 stream cipher for encryption. But, TKIP changes the temporal keys every 10,000 packets [5] that improves the security of the network.

WEP based access points and radio NIC’s can upgrade to TKIP by adding firmware patch to the existing hardware that is an advantage. Also, TKIP is backward compatible with WEP based hardware.

CCMP
TKIP is quick solution, to overcome the problems in WEP, to improve the WLAN security. But, it is not considered a long-term solution. So the 802.11i standard defines CCMP, [6] which is an encryption algorithm, based on AES. AES is a shared key block cipher, which offers much stronger encryption than RC4. AES, can be used with different encryption mode. The 802.11i standard specifies counter mode with CBC-MAC protocol, which provides confidentiality, data integrity and authentication.

The problem is that AES requires additional hardware to work. So, access points and clients (radio NIC’s) should be replaced to implement AES.But, as the penetration is still low, new wireless LAN’s can implement AES as part of the 802.11i standard and old WLAN’s can upgrade, depending on the costs.

5	Conclusion
It is important to deal with issues regarding security in wireless networks, as wireless applications are becoming very popular. As explained in this paper WEP does little to secure WLAN’s from attackers. But, it better to use WEP rather than not using any encryption to keep most people at bay. With the various new standards and specifications we can expect that sufficient security can be provided for wireless LAN’s, reducing the risk of attacks to a considerable level.
In this paper we have discussed about WEP, its vulnerabilities and various attacks that are possible on it. Solutions to improve security of the wireless network were also covered, with various techniques, which might replace WEP in years to come.

References:
[1] What’s up with WEP”
     http://www-106.ibm.com/developerworks/security/library/s-wep/
[2] WEP (Wired equivalent Privacy)
     http://www.nwfusion.com/details/715.html
[3] Security of WEP Algorithm.
      http://www.isaac.cs.berkeley.edu/isaac/wep-faq.html
[4] http://www.itsecurity.com/asktecs/sep1301.htm
[5] Security Beyond WEP 
     http://www.wi-fiplanet.com/tutorials/article.php/1377171
[6] Wireless LAN’s: Security issues and solutions 
      http://www.sans.org/rr/papers/68/1009.pdf
[7] Insecurity of 802.11
     http://www.isaac.cs.berkeley.edu/isaac/wep-draft.pdf