Wireless signals travel through the air, so anyone in range can listen, and security depends on strong encryption and authentication.
WEP
Wired Equivalent Privacy, part of the first Wi-Fi standard (1997 to 1999), uses the RC4 stream cipher with a 24-bit initialisation vector (IV) that is sent in clear with every frame. The IV is too short and repeats within a few thousand frames, and flaws in the key use let attackers recover the key in minutes (from 2001 onward). It also has a weak integrity check (CRC-32). WEP is broken and must not be used.
WPA
Wi-Fi Protected Access (2003) was a quick fix for old hardware. It uses TKIP (temporal key integrity protocol), which gives each packet a new key, adds a message integrity check and a longer IV. It still uses RC4 and has been deprecated.
WPA2
WPA2 (2004) is based on the full IEEE 802.11i standard and uses AES in CCMP mode, which gives strong encryption and integrity. Personal mode (PSK) uses a shared passphrase, from which keys are derived in a four-way handshake; Enterprise mode (802.1X) authenticates each user through a RADIUS server. Weaknesses: a captured handshake allows offline guessing of a weak passphrase, and the KRACK attack (2017) exploited the handshake (patched in software). WPS (push-button setup) is another weak point and should be disabled.
WPA3
WPA3 (2018) improves on WPA2: SAE (Simultaneous Authentication of Equals) replaces the PSK handshake, so that an offline dictionary attack on a captured handshake is not possible; it gives forward secrecy (old traffic stays safe if the passphrase leaks later); Protected Management Frames are required; open networks can use Opportunistic Wireless Encryption (OWE); and the enterprise mode offers a 192-bit security suite.
Good Practice
Use WPA3 (or WPA2-AES) with a long, random passphrase; disable WPS and WEP; change default router passwords and update firmware; hide nothing by hiding the SSID (it is not security); use a guest network for visitors; and use a VPN on public hotspots.
Definition: WPA3. The latest Wi-Fi security standard (2018), which replaces the pre-shared-key handshake with SAE, gives forward secrecy and protects management frames, so that captured traffic cannot be attacked offline.
Table 3.4: Wi-Fi security standards
| Standard | Cipher | Key feature | Status |
|---|---|---|---|
| WEP | RC4, 24-bit IV | First standard | Broken, never use |
| WPA | RC4 with TKIP | Per-packet keys | Deprecated |
| WPA2 | AES-CCMP | Four-way handshake | Widely used, acceptable |
| WPA3 | AES (GCM), SAE | No offline guessing, forward secrecy | Recommended |
Example 3.4: Why a 24-bit WEP IV repeats quickly
Problem: The IV has 24 bits, so N = 2²⁴ = 16,777,216 values. Using the birthday approximation, the chance that some IV has repeated after n frames is 1 − e^(−n²/2N). Find this chance for n = 4,096, the number of frames for a 50 percent chance, and the time for that at 500 frames per second.
Solution:
- For n = 4,096: n² = 16,777,216, so n²/2N = 0.5 and the chance = 1 − e^(−0.5) = 0.393, which is 39.3 percent.
- For 50 percent: n = √(2N ln 2) = √(2 × 16,777,216 × 0.693) = about 4,823 frames.
- Time = 4,823 / 500 = about 9.6 seconds.
Result: After only about 4,800 frames (less than 10 seconds of busy traffic) there is an even chance that an IV has been reused, which lets an attacker combine encrypted frames and recover the key stream.
import math
N = 2 ** 24
n = 4096
print("Chance at 4096 frames:",
round(1 - math.exp(-n * n / (2 * N)), 3))
half = math.sqrt(2 * N * math.log(2))
print("Frames for 50%:", round(half))
print("Seconds at 500 fps:", round(half / 500, 1))
Output
Chance at 4096 frames: 0.393
Frames for 50%: 4823
Seconds at 500 fps: 9.6
Common mistakes
- Using WEP or WPA with TKIP on any network.
- Using a short or dictionary passphrase on WPA2.
- Leaving WPS enabled.
- Believing that hiding the SSID makes a network secure.
Key takeaways
- WEP: RC4, 24-bit IV, broken; WPA: TKIP; WPA2: AES-CCMP; WPA3: SAE.
- WPA2 weakness: offline guessing of the passphrase and KRACK.
- WPA3: forward secrecy, protected management frames, OWE.
- Use strong passphrases, update firmware, disable WPS.
Practice questions
- Why is WEP insecure?
- Which cipher mode does WPA2 use?
- What does SAE in WPA3 prevent?
Answers to the practice questions
- Its 24-bit IV repeats quickly and RC4 key use is flawed, so the key can be recovered.
- AES in CCMP mode.
- Offline dictionary attacks on a captured handshake.
Sources
- Official BCA syllabus Computer Security, course code 25BCA406DS02, Unit III
