In WPA2-Personal, how do the client and access point prove they share the passphrase without ever sending it over the air?
answer
- derive, never transmit
- both sides compute the same PMK
- nonces travel in the clear
- a MIC only the right key produces
basics
~20 sBoth sides turn the passphrase into the same Pairwise Master Key locally, swap random nonces in the four-way handshake, derive a session key from them, and prove possession with a MIC only the correct key can produce.
solid answer
~40 sEach side runs the passphrase and the SSID through PBKDF2 to get the Pairwise Master Key (PMK); nothing about it is transmitted. In the four-way handshake the access point sends a random `ANonce` and the client answers with its own `SNonce`, so both can compute the Pairwise Transient Key (PTK) from the PMK, both nonces and both MAC addresses. The client's message 2 carries a MIC keyed with part of that PTK; the AP recomputes it, and only a matching PMK gives a matching MIC. Message 3 comes back with the AP's own MIC, so the proof runs both ways, and the session keys are never sent either.
go deeper
Recall that neither the passphrase nor the PMK ever crosses the air: both sides derive the same PMK locally, swap nonces and prove possession with a MIC.
Explain the order: PBKDF2 over the SSID gives the PMK, nonces plus MAC addresses give the PTK, and the KCK-keyed MIC in message 2 is the proof.
Show you know the limits: a shared PMK proves group membership rather than identity, and a weak passphrase stays weak however carefully it is kept off the air.
Tie the mechanism to the access model: because every member holds the same PMK, revoking one person's access means changing the secret on every device.
## What crosses the air and what never does **WPA2-Personal** is the pre-shared key mode of the security design defined in IEEE 802.11i: one passphrase, known to every member of the network, protects it. The natural worry is that typing that passphrase into a laptop means sending it somewhere. It does not. The proof of knowledge happens in the **four-way handshake**, four EAPOL-Key frames exchanged right after association, and every value in those frames is either public or protected by keys that only the passphrase leads to. | Item | Sent over the air? | Notes | |---|---|---| | Passphrase | Never | Typed on each device, 8 to 63 characters | | PMK (Pairwise Master Key) | Never | Computed locally on both sides | | `ANonce`, `SNonce` | Yes, in the clear | Fresh random values, 32 octets each | | MAC addresses | Yes | Already in every frame header | | EAPOL-Key MIC | Yes | A keyed checksum that proves key possession | | PTK (Pairwise Transient Key) | Never | Each side derives its own copy | | GTK (group key) | Yes, encrypted | Wrapped with a key taken from the PTK | ## Step 1: both sides compute the same PMK - The client turns the passphrase into a 256-bit **PMK** with PBKDF2 (RFC 8018), using HMAC-SHA1, the **SSID as the salt** and 4096 iterations, for a 32-octet result. hostapd and wpa_supplicant, the open-source reference implementation, compute it exactly this way. - The access point did the same computation when it was configured, or was given the 64-hex-digit PSK directly, so it already holds the same PMK. - Because the SSID is the salt, the same passphrase on a differently named network yields a different PMK. ## Step 2: exchange nonces, derive a session key, prove it 1. The access point, acting as the **authenticator**, sends message 1 with a random **ANonce**. 2. The client, acting as the **supplicant**, picks its own random **SNonce** and computes the **PTK** from the PMK, both nonces and both MAC addresses. 3. The client sends message 2 with its SNonce and a **MIC** over the frame, keyed with the first part of the PTK, the **key confirmation key (KCK)**. 4. The AP now has both nonces, derives the same PTK from its own PMK and recomputes the MIC. A match shows the client holds the right PMK, and therefore the right passphrase, although neither was transmitted. 5. Message 3 comes back with the AP's own MIC, which shows the client that the AP holds the same PMK; message 4 confirms, and both sides install the keys. NIST's guide to 802.11i describes the result in those terms: at the end of a successful four-way handshake the AP and the station have been mutually authenticated. ## Why the nonces matter The nonces make every session's PTK different even though the PMK does not change. Two laptops on the same network share one PMK but end up with different PTKs, because their MAC addresses and nonces differ, and a laptop that reconnects tomorrow gets a different PTK from today's. That is why the temporal key CCMP uses for unicast data is per client and per session even on a shared-passphrase network. ## What this does not give you - **The passphrase still matters.** Keeping it off the air protects it from a casual listener, but the scheme as a whole is only as strong as the passphrase is hard to guess. The published weaknesses of recorded handshakes are a separate subject. - **Group membership, not identity.** Every device that knows the passphrase holds the same PMK, so the handshake proves "this device knows the network's secret", not "this is a particular user" or "this is our own AP". Per-user identity and revocation are what 802.1X Enterprise adds, covered with Personal against Enterprise. - **Open-system authentication proves nothing.** The two authentication frames before association are a formality; the real check of the passphrase is the MIC in message 2.
- Why does renaming the SSID of a WPA2-Personal network change its PSK even though the passphrase stays the same?The SSID is the salt in the PBKDF2 derivation, so a new name produces a different 256-bit PMK from the same passphrase; hostapd's own configuration notes say the PSK changes when the SSID changes. Devices that store the passphrase simply recompute it, but anything configured with the 64-hex-digit PSK needs the new value, or its message 2 MIC will fail.
- Does the four-way handshake authenticate the access point to the client as well?Yes: the MIC on message 3 shows the AP holds the same PMK. On a Personal network, though, every member knows the passphrase, so this proves the AP belongs to the group of devices that know the secret, not that it is one particular, trusted AP. Proving the network's identity to clients is what Enterprise with a validated server certificate adds.
- The client sends the passphrase to the access point, encrypted, during association.
- The PMK is exchanged in message 1 of the handshake.
- Open-system authentication is the step where the passphrase is checked.
- Since the passphrase never crosses the air, its length and strength no longer matter.
- On a WPA2-Personal network the access point sends each client its own PMK.