About WPA/WPA2 4-time handshake

Source: Internet
Author: User
Tags gtk

Briefly describe some of the key words in WPA/WPA2 's 4-time handshake:

WPA/WPA2 uses a 4-time handshake to generate the required key. The four-time handshake generates PTK (pairwise Transient key) from the PMK (pairwise Master key) through a series of interactions. The PMK is from MSK (Master Session Key), which is the first 256 bits of the MSK, 32 bytes.

PTK contains 3 parts, KCK (Key confirmation key), KEK (key encryption key), TK (temporal key).

The total length of the PTK is different depending on the encryption method.

When the encryption method is TKIP, PTK length 512, in order to KCK accounted for 128 bits, KEK accounted for 128 bits, TK accounted for 256 bits.

When the encryption method is CCMP, the PTK length 384, in order to KCK accounted for 128 bits, KEK accounted for 128 bits, TK accounted for 128 bits.

KEK and KCK are used for encryption and integrity verification for Eapol-key, which is the four-time handshake. TK is used for subsequent data encryption.

The four-time handshake messages are based on Eapol-key, and the Eapol-key structure is as follows:

PTK how to generate

Generating PTK, requires 5 necessary elements, Pmk,anonce (nonce 1), Snonce (nonce 2), Authenticate Mac (Mac 1), supplicant mac (Mac 2). Such as:

The 2 nonce is the random number generated by authenticator and supplicant respectively.

The output in this diagram contains 4 parts, in fact the data encr and data mic together are the TK mentioned earlier. The EAPOL encr/mic correspond to the preceding KEK and KCK respectively.

4-Time Handshake interaction process


Authenticator sent Anonce to supplicant. When supplicant receives 1/4, it has all the elements that generate the PTK. Since 1/4 also contains the MAC address of the authenticator.


Supplicant calculates the PTK and sends Snonce and his MAC address to authenticator. At the same time, starting with 2/4 messages, each subsequent message will have a mic. 1/4 No.


Authenticator to supplicant prove that they have a valid, the same mic to join the


is only an ACK to 3/4. Note that PTK has been installed, the data behind can be encrypted.

The difference between WPA and WPA2 on 4-time handshake

WPA's GTK is installed after 4 handshakes, while the WPA2 GTK is installed during 4 handshakes, such as:

Wpa:4-way Handshake (PTK)

Wpa:2-way Handshake (GTK)


wpa2-4-Step Handshake protocol


About WPA/WPA2 4-time handshake

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.