iPXE
Data Fields
eapol_key_pkt Struct Reference

An EAPOL-Key packet. More...

#include <wpa.h>

Data Fields

u8 type
 One of the EAPOL_KEY_TYPE_* defines.
u16 info
 Bitfield of key characteristics, network byte order.
u16 keysize
 Length of encryption key to be used, network byte order.
u64 replay
 Monotonically increasing value for EAPOL-Key conversations.
u8 nonce [32]
 Nonce value.
u8 iv [16]
 Initialization vector.
u8 rsc [8]
 Receive sequence counter for GTK.
u8 _reserved [8]
 Reserved bytes.
u8 mic [16]
 Message integrity code over the entire EAPOL frame.
u16 datalen
 Length of the data field in bytes, network byte order.
u8 data [0]
 Key data.

Detailed Description

An EAPOL-Key packet.

These are used for the WPA 4-Way Handshake, whether or not prior authentication has been performed using EAP.

On LANs, an eapol_key_pkt is always encapsulated in the data field of an eapol_frame, with the frame's type code set to EAPOL_TYPE_KEY.

Unlike 802.11 frame headers, the fields in this structure are stored in big-endian!

Definition at line 104 of file wpa.h.


Field Documentation

One of the EAPOL_KEY_TYPE_* defines.

Definition at line 107 of file wpa.h.

Referenced by eapol_key_rx().

Bitfield of key characteristics, network byte order.

Definition at line 110 of file wpa.h.

Referenced by eapol_key_rx(), wpa_handle_1_of_2(), wpa_handle_3_of_4(), wpa_send_2_of_4(), wpa_send_eapol(), and wpa_send_final().

Length of encryption key to be used, network byte order.

This is 16 for CCMP, 32 for TKIP, and 5 or 13 for WEP.

Definition at line 116 of file wpa.h.

Referenced by eapol_key_rx(), wpa_handle_3_of_4(), wpa_send_2_of_4(), wpa_send_eapol(), and wpa_send_final().

Monotonically increasing value for EAPOL-Key conversations.

In another classic demonstration of overengineering, this 8-byte value will rarely be anything above 1. It's stored in network byte order.

Definition at line 124 of file wpa.h.

Referenced by eapol_key_rx(), and wpa_send_eapol().

Nonce value.

This is the authenticator's ANonce in frame 1, the peer's SNonce in frame 2, and 0 in frames 3 and 4.

Definition at line 131 of file wpa.h.

Referenced by wpa_handle_1_of_4(), wpa_handle_3_of_4(), wpa_send_2_of_4(), and wpa_send_final().

Initialization vector.

This contains the IV used with the Key Encryption Key, or 0 if the key is unencrypted or encrypted using an algorithm that does not require an IV.

Definition at line 139 of file wpa.h.

Referenced by eapol_key_rx(), wpa_handle_1_of_2(), and wpa_send_final().

Receive sequence counter for GTK.

This is used to synchronize the client's replay counter for ordinary data packets. The first six bytes contain PN0 through PN5 for CCMP mode, or TSC0 through TSC5 for TKIP mode. The last two bytes are zero.

Definition at line 148 of file wpa.h.

Referenced by wpa_handle_1_of_2(), and wpa_handle_3_of_4().

Reserved bytes.

Definition at line 151 of file wpa.h.

Message integrity code over the entire EAPOL frame.

This is calculated using HMAC-MD5 when the key descriptor version field in info is 1, and HMAC-SHA1 ignoring the last 4 bytes of the hash when the version field in info is 2.

Definition at line 160 of file wpa.h.

Referenced by eapol_key_rx(), and wpa_send_eapol().

Length of the data field in bytes, network byte order.

Definition at line 163 of file wpa.h.

Referenced by eapol_key_rx(), wpa_handle_1_of_2(), wpa_handle_3_of_4(), wpa_send_2_of_4(), wpa_send_eapol(), and wpa_send_final().

Key data.

This is formatted as a series of 802.11 information elements, with cryptographic data encapsulated using a "vendor-specific IE" code and an IEEE-specified OUI.

Definition at line 171 of file wpa.h.

Referenced by eapol_key_rx(), wpa_handle_1_of_2(), and wpa_handle_3_of_4().


The documentation for this struct was generated from the following file: