netviz

802.11 · WiFi

WPA2-Personal joining a protected Wi-Fi network

Every time a phone joins a protected Wi-Fi network, a four-message cryptographic conversation decides whether it gets in. This scene makes that conversation visible — step by step, at the depth you choose.

Sequence diagram poster of the WPA2 4-way handshake

Requesting scene from the content service…

4 messages
EAPOL-Key handshake
256-bit
the PMK
PMK / PTK / GTKANonce / SNonceMIC seal802.1X controlled port

What you'll learn

  • Why association alone gives you no connectivity: the 802.1X controlled port stays blocked until keys are installed.
  • How both sides derive the PMK from the passphrase and SSID (PBKDF2), and why the password itself never crosses the air.
  • What each of the four EAPOL-Key messages contributes: ANonce, SNonce + MIC, GTK delivery, and the final acknowledgement.
  • The difference between the PTK (your unicast key) and the GTK (the shared broadcast key).
  • What a wrong password actually looks like on the air — repeated Message 1/Message 2 cycles with MIC failures — and how to recognize it in a capture.

The problem the handshake solves

WPA2-Personal protects a network with a shared passphrase, but sending that passphrase over the air — even once, even hashed — would hand attackers everything they need. The 4-way handshake solves a harder problem: both sides must prove to each other that they know the same secret, derive fresh encryption keys for this session only, and switch encryption on at exactly the same moment, all over an untrusted radio channel.

Before the handshake begins, the device and the access point have already found each other (probe), exchanged a legacy greeting (Open System Authentication, which checks nothing), and associated. At that point the client is attached but quarantined: the IEEE 802.1X controlled port discards every data frame. No password proof, no traffic.

Four messages, one shared proof

Both sides independently expand the passphrase and network name into a 256-bit Pairwise Master Key (PMK). The access point then sends a one-time random number (ANonce). The client generates its own (SNonce), combines both nonces, both MAC addresses and the PMK into a session key — the Pairwise Transient Key (PTK) — and answers with its SNonce plus a cryptographic seal (MIC) computed with part of that key.

The access point performs the same derivation and checks the seal. A matching MIC proves the client holds the same PMK — and therefore the same passphrase — without the passphrase ever leaving either device. The third message delivers the group key (GTK) for broadcast traffic, encrypted; the fourth acknowledges. Both sides install keys, the controlled port opens, and from the next frame onward everything in the air is AES-encrypted.

Why engineers keep coming back to this diagram

The 4-way handshake is where Wi-Fi problems become diagnosable. A client that associates but never gets traffic, a phone that says “connected” with no internet, a wrong-password loop that the operating system reports vaguely — each leaves a distinct fingerprint in the EAPOL exchange. Reading those four messages in a packet capture separates guessing from knowing.

The interactive scene above replays the full sequence — discovery, association, the four EAPOL-Key messages, and the first protected frame — with three narration depths: a plain analogy for explaining to a customer, a specification-grade account for certification study, and an operations view of what breaks and how to spot it.

Atlas index