Friday, July 31, 2015

Keys Generation: 4 Way Handshake & Group Key Handshake

  • Master Session Key Generation (MSK) -at least 64 octets in length
    • By Product of 802.1x authentication method
  • PMK & GMK Generation
    • Under 802.1X
      • PMK is first 256 bits  (bits 0 - 255) of the MSK. 
      • A new, unique PMK is generated every time a client authenticates or reauthenticates
      • PMK is sent from authentication server over a secure channel to the authenticator. 
    • Under WPA/WPA2 Personal
      • However, In WPA/WPA2-Personal PSK becomes PMK. RSNA PSK is 256 bits long (64 char) which is quite long. 802.11-2007 defines passphrase-psk mapping formula to derive psk(256 bit) from pass phrase/password. 
      • Passphrase is sequence of between 8 to 63 ASCII encoded characters.
      • PSK = PBKDF2(PassPhrase, SSID, SSID-Len, 4096, 256)
      • For all clients under a given SSID, the PSK will be same which is not the case with 802.1X where all clients' PSK is different

  • PTK & GTK Generation (using 4-Way Handshake)

  • PTK Decomposition

  • GTK Regeneration & Distribution (using Group Key Handshake)
    • GTK can be regenerated under two conditions:
      • Periodic regeneration configured (if available)
      • On client disassociation so that GTK known to disconnected client becomes useless.


  • Layers

Figure 1: WEP MPDU 

Figure 2: WPA MPDU

Figure 3: CCMP MPDU


  • WEP


  1. WEP 40(5 char)/104(13 char) uses 40/104 bits WEP Key respectively which is STATIC. 
  2. WEP is prone to IV collisions & weak WEP keys. 
  3. No Sequence number & MIC is available. Hence, prone to many other attacks.  
  4. Upto 4 keys can be defined on each end & different key can be used for encryption & decryption. 

  • TKIP

Advantages over WEP: 
  1. Uses Dynamic keys (temporal key PTK, GTK) which is generated after 4 Way handshake. PTK/GTK is 128 bits long.
  2. WEP Seed generation is made more advanced. 
  3. MIC introduced which provides data integrity. 
  4. TSC Introduced: Transmit Sequence number helps to prevent replay & re-injection attacks. 
  5. TKIP countermeasures defined in case of MIC failure. 

  • CCMP


  • MIC protects certain portion of MAC header along with data.