Skip to main content
How systems communicate — TCP/IP, HTTP, DNS, load balancing, and security.

Networking

How systems communicate — TCP/IP, HTTP, DNS, load balancing, and security.

Wi-Fi Security · EAPOL Studio

WPA2 · 4-Way Handshake

4 EAPOL-Key messages · PMK→PTK/GTK · no passphrase on air
Step 0 / 0
Speed 200ms
Step 0 / 0
Phase init
Message —
Client State IDLE
AP State LISTEN
Status Ready
PMK
— (derive from passphrase)
PTK (session)
—
GTK (group)
—
Client → AP
AP → Client
Active Message
Key Material
Step Explanation

Press Play to watch the WPA2 4-way handshake derive a session key without ever sending the passphrase.

Pseudocode
 

Wi-Fi Security: WEP, WPA2 & WPA3

Intermediate (3/5) ~2–3 hours WEP WPA2 4-Way Handshake PMK & PTK 802.1X RADIUS WPA3 SAE Rogue AP Prereqs: Wireless Networking & Wi-Fi Fundamentals
Quick Reference

wpa2

No registry entry found for algorithm id "wpa2". If this is a curriculum-only studio, the complexity and quick-reference panel is intentionally omitted.

While net-security-basics covers general network defense (firewalls, IDS, Zero Trust), wireless adds a special threat: anyone in radio range can eavesdrop or inject traffic. Wired networks assume physical access to the cable; Wi-Fi must authenticate and encrypt every station over the air. That is the story of WEP → WPA2 → WPA3.

Why Radio Breaks Wired Assumptions

  • Eavesdropping — any listener in range can capture every frame. Encryption is mandatory, not optional.
  • Injection — an attacker can forge frames from another station, so authentication and integrity matter as much as confidentiality.
  • De-auth attacks — management frames are not encrypted in some generations, letting an attacker force stations off the network (a DoS).

WEP: Broken from the Start

Wired Equivalent Privacy (1997) attempted to provide confidentiality and integrity on a gesture toward wired security, but it was fatally weak:

  • A 40-bit (or 104-bit) key is static for the whole network and often reused across many sessions.
  • It reused a 24-bit IV (Initialization Vector) — with enough traffic, IVs repeat (the birthday problem) and the key stream is recoverable.
  • Its integrity check (CRC-32) is not cryptographically keyed, so an attacker can flip bits and recompute a valid checksum.

Result: a WEP network is decryptable in minutes with off-the-shelf tools. WEP was formally deprecated and should never be used.

WPA2: Pre-Shared Keys & the 4-Way Handshake

WPA2 (802.11i, 2004) is built on AES-CCMP. In Personal mode every station shares a Pre-Shared Key (PSK) — a passphrase. The PSK itself never travels over the air; instead it is derived into keys through the 4-way handshake:

  1. The AP sends an ANonce (a random number).
  2. The station replies with its SNonce plus a Message Integrity Code (MIC).
  3. Both sides independently derive a Pairwise Transient Key (PTK) from the passphrase-derived PMK, the two nonces, and both MAC addresses.
  4. They confirm — now a unique, per-session encryption key protects the link (forward secrecy holds even if the PSK is later leaked).

The passphrase is turned into the PMK by PBKDF2 (a slow key-derivation function) with the network’s SSID as salt.

Why WPA2-PSK Can Be Cracked Offline

An attacker who captures the 4-way handshake can offline brute-force the passphrase: because PBKDF2 is deterministic, they try candidate passphrases, derive the PMK/PTK, and check whether the captured MIC matches. Weak passphrases fall fast. Defenses include using long, random passphrases, or moving to WPA3/WPA2-Enterprise, which does not rely on a guessable shared secret.

Enterprise Mode: 802.1X & RADIUS

Instead of one shared PSK, Enterprise (WPA2/WPA3-Enterprise) authenticates each user against a RADIUS server using 802.1X:

  1. The station’s supplicant starts an Extensible Authentication Protocol (EAP) exchange.
  2. The AP (authenticator) forwards it to the RADIUS server (authentication server).
  3. EAP-TLS (certificate-based) or EAP-PEAP (username/password inside TLS) proves identity.
  4. On success, the server delivers a fresh key per session — so each user’s traffic is separately encrypted and revocable.

This is the secure pattern for corporate and campus Wi-Fi; a compromised device can be revoked without changing one shared password.

WPA3 & Modern Defenses

WPA3 (2018) fixes the last big WPA2 weakness — the offline PSK guessing attack:

  • SAE (Simultaneous Authentication of Equals) replaces the PSK handshake with a Dragonfly key exchange. Each guess now requires an online interaction with the AP, so offline dictionary attacks fail even with weak passphrases.
  • 192-bit security mode and forward secrecy are default.
  • PMF (Protected Management Frames) is required, defeating unauthenticated de-auth attacks.

Hardening Checklist

  • Never use WEP — use WPA3 (or WPA2/WPA3 mixed) with a long, random passphrase.
  • Use Enterprise + EAP-TLS for anything sensitive, so credentials are certificates, not passwords.
  • Enable Protected Management Frames and, on managed Wi-Fi, rogue-AP / de-auth detection.
  • Segment guest networks with client isolation so one compromised device cannot reach others.

Verify It Yourself

  1. Run the Wi-Fi Security thread back-to-back with the net-security-basics topic and contrast: which defenses are link-layer (this topic) vs network/edge-layer (that topic)?
  2. On your router, check whether WPA2-PSK, WPA3-SAE, or 802.1X is configured and whether PMF is enabled.
  3. Reason through the offline attack: why does capturing the 4-way handshake never reveal the passphrase directly, yet let an attacker test guesses?