The four-way handshake is a critical component in Wi-Fi security protocols designed to ensure secure connections between a device and an access point. It consists of a sequence of exchanges aimed at establishing a Pairwise Transient Key (PTK), which encrypts data between a client and an access point.
Here’s how the process works:
- First, the access point sends a nonce (ANonce) to the client device. This nonce is a random number that ensures each session is unique.
- The client device responds by generating its own nonce (SNonce) and a Message Integrity Code (MIC) using the nonce from the access point. This response, including the SNonce and MIC, is sent back to the access point.
- The access point independently calculates the PTK using both nonces and the MAC addresses of the devices, then verifies the MIC. If everything checks out, it sends the Group Temporal Key (GTK) and another MIC back to the client.
- Finally, the client confirms the message by verifying the MIC and acknowledges this back to the access point, completing the handshake.
This process ensures that both parties can communicate securely, using the newly generated key as the basis for encrypting further data.