SHA1(PMK, "Pairwise expansion", Min(AA,SPA) Max(AA,SPA) Min(ANonce,SNonce) Max(ANonce,SNonce)) The PTK is cut up in order to provide the following keys: - 128-bit key confirmation key (KCK). This key is used to authenticate messages during the four-way handshake procedure; - 128-bit key encryption key (KEK). This key is used to encrypt messages during the four-way handshake and group key handshake procedures; - 128-bit temporary key (TK). This key, used for TKIP and CCMP, serves to encrypt unicast data; - 64-bit TMK1 (temporary message integrity code (MIC)) and TMK2. These keys, used for TKIP, check the integrity of the data. Each direction of Mutual Authentication transmission uses a specific key: TMK1 is used by the AP, and TMK2 is used by the station to generate the seal. The derivation of the GMK also uses the HMAC-SHA1 function, with a result 128 bits in size for the CCMP and 256 bits in size for the TKIP. The GTK, derived from the GMK master key, is obtained from the MAC address (AA) of the authenticator and from the random number (Gnonce): GTK = HMAC-SHA1(GMK, "Group key expansion" AA GNonce) The GTK is cut up in order to provide the following keys: - 128-bit group encryption key (GEK). This key, used for TKIP and CCMP, encrypts broadcast and multicast data; - 128-bit group integrity key (GIK). This key, used for TKIP, checks the integrity of broadcast and multicast data. 6.2.2. Four-way handshake procedure The four-way handshake procedure defines four EAPOL-Key messages exchanged between the authenticator and the supplicant (Figure 6.6). Supplicant Authenticator EAPOL-Key The supplicant (Anonce) The authenticator generates Snonce generates Anonce calculates the PTK key PTK EAPOL-Key The authenticator The supplicant (Snonce, MIC) calculates the PTK key generates the MIC seal from the KCK seal checks the MIC seal from the KCK key The authenticator EAPOL-Key generates the GTK key MIC, GTK encrypts the GTK key with the KEK key EAPOL-Key Figure 6.6. Four-way handshake procedure 116 Wi-Fi Integration to the 4G 