Computer Networking › Section H · Security in computer networks › Topic H.8
Securing wireless LANs and cellular networks
A radio signal reaches everyone in range, so the first hop of a wireless connection is the easiest place for Trudy to listen or pretend to be the network. Wi-Fi and cellular systems answer with mutual authentication and fresh keys for every connection.
Why the wireless hop needs its own protection
On a wired LAN, Trudy must reach a cable or a switch port. On a wireless one, a receiver in the car park will do. She can capture every frame, and she can transmit too: posing as an access point or base station, injecting frames, or forging control messages. Link-layer security therefore has to do two jobs on the first hop: make the device and the network authenticate each other, and give them fresh keys to encrypt and protect every frame. "Wireless LANs: 802.11" and "Cellular networks: 4G and 5G" described how these links work; this topic covers how each secures them.
A short history of Wi-Fi security
The original 802.11 standard of 1997 included WEP, which used the RC4 cipher with a short 24-bit initialisation vector and a CRC for integrity. IVs repeated quickly, the CRC could be adjusted by an attacker, and from 2001 published attacks recovered WEP keys from captured traffic. WPA, in 2003, was a stopgap that ran on old hardware. WPA2, in 2004, implemented the IEEE 802.11i standard with AES in CCMP mode. WPA3 arrived in 2018. The Wi-Fi Alliance has required WPA3 support for newly certified devices since July 2020, and WPA3 is mandatory in the 6 GHz band used by Wi-Fi 6E and Wi-Fi 7.
Four phases of 802.11i
802.11i security involves the device, the access point (AP) and, in enterprise networks, an authentication server. 1. Discovery: the AP advertises which security methods it supports, and the device picks one. 2. Mutual authentication: the device and the network prove their identities to each other and end up sharing a master key, the pairwise master key (PMK). In enterprise networks the AP relays this exchange, using 802.1X and EAP, to an authentication server, often a RADIUS server. 3. Key derivation: the device and the AP turn the PMK into fresh session keys. 4. Protected data: frames are encrypted and integrity-checked with those keys.
Personal and enterprise modes
In WPA2-Personal the PMK comes straight from a shared passphrase. Anyone who captures one handshake can then guess passphrases offline, testing each guess against the captured messages, so a short or common passphrase falls quickly. WPA3-Personal replaces this with SAE, Simultaneous Authentication of Equals, a password-authenticated key exchange. Each guess now requires a live exchange with the network, so offline guessing no longer works, and keys from past sessions stay safe if the password later leaks. Enterprise modes give each user their own credentials, often certificates with EAP-TLS, and WPA3-Enterprise adds an optional 192-bit mode.
The four-way handshake
Once both sides hold the PMK, they never send it. Instead the AP and device exchange four messages. The AP sends a random nonce, the ANonce. The device picks its own SNonce and computes the pairwise transient key (PTK) from the PMK, both nonces and both MAC addresses, then sends its SNonce with a message integrity code computed with the new key. The AP computes the same PTK, checks the code, and replies with a protected message carrying the group key used for broadcast frames. The device confirms. Fresh nonces mean every association gets new keys, and a correct code proves each side knows the PMK.
Worked example: following the handshake
A laptop joins an office network; both sides already hold the PMK. 1. The AP sends ANonce. 2. The laptop chooses SNonce, computes the PTK from the PMK, ANonce, SNonce and both MAC addresses, and sends SNonce with an integrity code. 3. The AP computes the same PTK and checks the code: it matches, so the laptop knows the PMK. 4. The AP sends the encrypted group key with its own integrity code, which the laptop checks, so the AP knows the PMK too. 5. The laptop confirms, and both install their keys. Check: Trudy saw both nonces, but without the PMK she cannot compute the PTK.
Management frames and open networks
Early Wi-Fi left management frames, such as the frame telling a device to disconnect, unauthenticated, so anyone could forge them and knock devices off a network. Protected Management Frames, from 802.11w, authenticate them, and WPA3 requires them. Open networks in cafés and airports were traditionally unencrypted. Wi-Fi Enhanced Open, based on Opportunistic Wireless Encryption, gives each device its own encryption key through an unauthenticated Diffie-Hellman exchange, which stops passive eavesdropping, though not a fake access point. Implementations matter too: the KRACK flaw of 2017 let the WPA2 handshake be manipulated into reusing nonces until devices were patched.
Authentication in 4G
Cellular security starts with the SIM, which holds a secret key K that only the subscriber's home network also knows; it is never transmitted. 2G GSM authenticated the phone but not the network, so false base stations could pose as real ones. 4G uses Authentication and Key Agreement (AKA), which is mutual. When a phone attaches to a visited network, that network's mobility management entity (MME) asks the home network's subscriber server for an authentication vector: a random challenge RAND, a token AUTN that proves the challenge came from the home network, the expected response XRES, and a key for the session.
Worked example: 4G AKA step by step
A phone roams onto a visited network. 1. The visited network's MME requests an authentication vector from the home network, which computes RAND, AUTN, XRES and a session key from K. 2. The MME sends RAND and AUTN to the phone. 3. The SIM uses K to check AUTN; a valid token shows the challenge came from the real home network, so the network is authenticated. 4. The SIM computes the response RES from K and RAND and returns it. 5. The MME compares RES with XRES; a match authenticates the phone. 6. Both derive encryption and integrity keys from the session key. Check: K never left the SIM or the home network.
What 5G changed
5G keeps the same idea but closes two gaps. First, in 4G the visited network makes the final decision that a phone is genuine. In 5G, with 5G-AKA or EAP-AKA′, the home network confirms the result itself, so a dishonest or compromised visited network cannot claim a subscriber attached when it did not. Second, 4G phones sometimes had to send their permanent identity, the IMSI, unencrypted, which let fake base stations, known as IMSI catchers, track people. A 5G phone encrypts its permanent identifier, the SUPI, with the home network's public key, sending only a concealed form, the SUCI.
Common mistakes to avoid
First, leaving WEP or WPA with TKIP enabled; both are broken. Second, assuming WPA2-Personal is safe with any passphrase; captured handshakes allow offline guessing. Third, thinking the four-way handshake sends the master key; it proves both sides know it. Fourth, believing an Enhanced Open network authenticates the access point; it only encrypts. Fifth, thinking GSM-style one-way authentication is enough; the network must prove itself too. Sixth, assuming link-layer security protects data beyond the access point or base station; end-to-end protection needs TLS or similar.
Key takeaways
Wireless links need mutual authentication and fresh keys because anyone in range can listen and transmit. WEP failed; WPA2 uses AES-CCMP, and WPA3 adds SAE, which blocks offline password guessing, and required protected management frames. 802.11i moves through discovery, mutual authentication to a PMK, the four-way handshake that derives the PTK from fresh nonces, and protected data. Cellular AKA uses a key K shared by the SIM and home network: AUTN authenticates the network and RES the phone. 5G lets the home network confirm authentication and conceals the permanent identity as a SUCI.
Flashcards
Flashcard
Original 1997 Wi-Fi security, using RC4 with a 24-bit IV
Test your understanding
Question 1 of 5
Why can a short passphrase on a WPA2-Personal network be cracked by someone who captured one handshake?
Question 2 of 5
During the 802.11 four-way handshake, what is sent between the device and the access point?
Question 3 of 5
What does WPA3's SAE achieve that WPA2-Personal did not?
Question 4 of 5
In 4G AKA, how does the phone know it is talking to a genuine network rather than a false base station?
Question 5 of 5
How does 5G stop fake base stations from learning a subscriber's permanent identity?
