Wi-Fi Key Hierarchy: From MSK to TK

Every Wi-Fi security mode ends with the same few keys: the PMK, the PTK and its three parts, and the group keys. Pick a mode, then click any key to see where it comes from, who holds it and what it protects, with real values worked out in your browser.

One ladder, different first rungs

New to the acronyms? See Abbreviations below.

The security modes differ only in how the client and AP get the PMK (Pairwise Master Key): from a passphrase (WPA2-Personal), a Diffie-Hellman exchange (WPA3-Personal, Enhanced Open) or an 802.1X login whose MSK the RADIUS server hands to the AP (Enterprise). From the PMK down, it's the same: the 4-way handshake mixes the PMK with two random numbers into a PTK, which splits into the KCK, KEK and TK, and the AP hands out its group keys encrypted with the KEK.

1 · The key tree

Security mode
Credential Exchange or public input From the authentication server Master keys (PMK and its FT relatives) Per-association keys (PTK) Group keys (from the AP)

2 · Who holds which key

Keys never go on the air in the clear. The only things sent openly are the random numbers, the PMKID (a name for the PMK), and the group keys, which travel encrypted with the KEK.

3 · What changes between modes

PMK comes fromPMK sizeKey derivationPTK = KCK + KEK + TKData cipher
WPA2-PersonalPBKDF2(passphrase, SSID)256 bitsPRF-SHA1128 + 128 + 128 bitsCCMP-128
WPA3-PersonalSAE exchange256 bitsKDF-SHA256128 + 128 + 128 bitsCCMP-128 (GCMP-256 optional)
Enhanced OpenDiffie-Hellman in association256 bitsKDF-SHA256128 + 128 + 128 bitsCCMP-128
WPA2/WPA3-EnterpriseFirst 256 bits of the MSK256 bitsPRF-SHA1 or KDF-SHA256128 + 128 + 128 bitsCCMP-128
Enterprise + 802.11rSecond 256 bits of the MSK (XXKey) → PMK-R0 → PMK-R1256 bitsKDF-SHA256128 + 128 + 128 bitsCCMP-128
WPA3-Enterprise 192-bitFirst 384 bits of the MSK384 bitsKDF-SHA384192 + 256 + 256 bitsGCMP-256

Abbreviations

The terms used on this page, in alphabetical order.

AKM ↗
Authentication and Key Management suite: the method the network uses to authenticate and derive keys (e.g. PSK, SAE, 802.1X). Chooses the key derivation hash.
ANonce / SNonce ↗
Authenticator (AP) nonce and Supplicant (client) nonce: 256-bit random numbers exchanged in the 4-way handshake.
BIGTK ↗
Beacon Integrity Group Temporal Key: lets clients check that beacons are genuine (beacon protection).
BIP ↗
Broadcast/Multicast Integrity Protocol: protects broadcast management frames with the IGTK.
CCMP ↗
Counter mode with CBC-MAC Protocol: the AES-based data encryption of WPA2 and WPA3 ("AES" in router settings).
DH / ECDH ↗
Diffie-Hellman / Elliptic-Curve Diffie-Hellman: a way for two sides to agree a secret over an open channel.
EAP ↗
Extensible Authentication Protocol: the login framework used by 802.1X (EAP-TLS, PEAP, EAP-TTLS).
EAPOL ↗
EAP over LAN: the frames that carry EAP and the 4-way handshake between client and AP.
EMSK ↗
Extended Master Session Key: a second 512-bit key from the EAP method, kept by client and server.
ERP ↗
EAP Re-authentication Protocol: fast re-login using keys derived from the EMSK (used by FILS).
FILS ↗
Fast Initial Link Setup (802.11ai): joins a network in fewer frames.
FT ↗
Fast (BSS) Transition, 802.11r: roaming with keys prepared in advance.
GCMP ↗
Galois/Counter Mode Protocol: AES-based encryption used by WPA3-Enterprise 192-bit and supported by Wi-Fi 7 devices.
GMK ↗
Group Master Key: an AP secret that group keys can be derived from.
GTK ↗
Group Temporal Key: encrypts broadcast and multicast data; shared by all clients.
HMAC ↗
Hash-based Message Authentication Code: a keyed hash (here with SHA-1, SHA-256 or SHA-384).
IGTK ↗
Integrity Group Temporal Key: protects broadcast management frames when PMF is on.
KCK ↗
Key Confirmation Key: part of the PTK; signs the handshake messages (the MIC).
KDF ↗
Key Derivation Function: the 802.11 function (HMAC-SHA-256 or -384) that stretches a key into longer keys.
KEK ↗
Key Encryption Key: part of the PTK; encrypts the group keys the AP sends.
L(x, start, length)
Take "length" bits of x starting at bit "start", e.g. L(MSK, 0, 256) = the first 256 bits of the MSK.
MDID ↗
Mobility Domain ID: identifies the group of APs a client can fast-roam between with 802.11r.
MIC ↗
Message Integrity Code: a check value that proves a message wasn't changed and came from a key holder.
MSK ↗
Master Session Key: 512 bits produced by the EAP login; the RADIUS server sends it to the AP.
OKC ↗
Opportunistic Key Caching: a controller shares a client's PMK with all its APs (pre-802.11r fast roaming).
OWE ↗
Opportunistic Wireless Encryption ("Enhanced Open"): encryption for networks with no password.
PBKDF2 ↗
Password-Based Key Derivation Function 2: turns the WPA2 passphrase and SSID into the PMK (4,096 HMAC-SHA1 rounds).
PMF ↗
Protected Management Frames (802.11w): protects deauthentication and other management frames. Required in WPA3.
PMK ↗
Pairwise Master Key: the master key shared by one client and the AP (or all clients, with WPA2-Personal).
PMK-R0 / PMK-R1 ↗
The two levels of the 802.11r key hierarchy: R0 stays on the R0 key holder, R1 is made for each AP.
PMKID ↗
PMK Identifier: a 128-bit name for a PMK, sent in the clear so both sides can refer to a cached key.
PMKSA ↗
PMK Security Association: a cached PMK plus its lifetime and details, used to skip a full login.
PRF ↗
Pseudo-Random Function: the original 802.11 key expansion function (HMAC-SHA-1), used by WPA2.
PSK ↗
Pre-Shared Key: a passphrase (or the PMK made from it) known by everyone on the network.
PTK ↗
Pairwise Transient Key: made in the 4-way handshake; split into KCK, KEK and TK.
R0KH / R1KH ↗
R0 and R1 Key Holders: the device holding PMK-R0 (usually a controller) and the AP holding a PMK-R1.
RADIUS ↗
Remote Authentication Dial-In User Service: the protocol (and server) that checks 802.1X logins.
RSN ↗
Robust Security Network: the 802.11i security framework; the RSN element lists a network's ciphers and AKMs.
SAE ↗
Simultaneous Authentication of Equals: the password-based Diffie-Hellman exchange of WPA3-Personal.
SHA ↗
Secure Hash Algorithm (SHA-1, SHA-256, SHA-384): the hash inside HMAC, PRF and KDF.
SSID ↗
Service Set Identifier: the network name.
TK ↗
Temporal Key: part of the PTK; encrypts unicast data with CCMP or GCMP.
TLS ↗
Transport Layer Security: the encrypted session inside EAP-TLS, PEAP and EAP-TTLS.
XXKey ↗
The key at the top of the 802.11r hierarchy: the second 256 bits of the MSK (802.1X) or the PSK.
4-way handshake ↗
Four EAPOL-Key messages in which the client and AP prove they share the PMK, make the PTK and install keys.
802.1X ↗
The port-based access control standard used for enterprise Wi-Fi logins (EAP over the air, RADIUS to the server).

↗ opens a term's full entry in the Wi-Fi Glossary, which explains over 400 Wi-Fi terms with their IEEE 802.11 references.

Notes