iPXE
Data Fields
wpa_common_ctx Struct Reference

Common context for WPA security handshaking. More...

#include <wpa.h>

Data Fields

struct net80211_devicedev
 802.11 device we are authenticating for
u8 pmk [WPA_PMK_LEN]
 The Pairwise Master Key to use in handshaking.
int pmk_len
 Length of the Pairwise Master Key.
enum wpa_state state
 State of EAPOL-Key handshaking.
u64 replay
 Replay counter for this association.
enum wpa_keymask valid
 Mask of valid keys after authentication success.
enum net80211_crypto_alg crypt
 The cipher to use for unicast RX and all TX.
enum net80211_crypto_alg gcrypt
 The cipher to use for broadcast and multicast RX.
struct wpa_ptk ptk
 The Pairwise Transient Key derived from the handshake.
struct wpa_gtk gtk
 The Group Transient Key derived from the handshake.
u8 Anonce [WPA_NONCE_LEN]
 Authenticator-provided nonce.
u8 Snonce [WPA_NONCE_LEN]
 Supplicant-generated nonce (that's us)
int have_Snonce
 Whether we should refrain from generating another SNonce.
void * ap_rsn_ie
 Data in WPA or RSN IE from AP's beacon frame.
int ap_rsn_ie_len
 Length of ap_rsn_ie.
int ap_rsn_is_rsn
 Whether ap_rsn_ie is an RSN IE (as opposed to old WPA)
struct list_head list
 List entry.

Detailed Description

Common context for WPA security handshaking.

Any implementor of a particular handshaking type (e.g. PSK or EAP) must include this structure at the very beginning of their private data context structure, to allow the EAPOL-Key handling code to work. When the preliminary authentication is done, it is necessary to call wpa_start(), passing the PMK (derived from PSK or EAP MSK) as an argument. The handshaker can use its step function to monitor state in this wpa_ctx structure for success or failure. On success, the keys will be available in ptk and gtk according to the state of the valid bitmask.

After an initial success, the parent handshaker does not need to concern itself with rekeying; the WPA common code takes care of that.

Definition at line 291 of file wpa.h.


Field Documentation

802.11 device we are authenticating for

Definition at line 294 of file wpa.h.

Referenced by eapol_key_rx(), wpa_derive_ptk(), wpa_fail(), wpa_handle_3_of_4(), wpa_install_gtk(), wpa_install_ptk(), wpa_send_2_of_4(), wpa_send_eapol(), wpa_start(), and wpa_stop().

The Pairwise Master Key to use in handshaking.

This is set either by running the PBKDF2 algorithm on a passphrase with the SSID as salt to generate a pre-shared key, or by copying the first 32 bytes of the EAP Master Session Key in 802.1X-served authentication.

Definition at line 303 of file wpa.h.

Referenced by wpa_derive_ptk(), and wpa_start().

Length of the Pairwise Master Key.

This is always 32 except with one EAP method which only gives 16 bytes.

Definition at line 310 of file wpa.h.

Referenced by wpa_derive_ptk(), and wpa_start().

State of EAPOL-Key handshaking.

Definition at line 313 of file wpa.h.

Referenced by wpa_handle_1_of_4(), wpa_handle_3_of_4(), wpa_psk_step(), and wpa_start().

Replay counter for this association.

This stores the replay counter value for the most recent packet we've accepted. It is initially initialised to ~0 to show we'll accept anything.

Definition at line 321 of file wpa.h.

Referenced by eapol_key_rx(), and wpa_start().

Mask of valid keys after authentication success.

If the PTK is not valid, the GTK should be used for both unicast and multicast decryption; if the GTK is not valid, multicast packets cannot be decrypted.

Definition at line 329 of file wpa.h.

The cipher to use for unicast RX and all TX.

Definition at line 332 of file wpa.h.

Referenced by wpa_install_ptk(), and wpa_start().

The cipher to use for broadcast and multicast RX.

Definition at line 335 of file wpa.h.

Referenced by wpa_handle_3_of_4(), wpa_install_gtk(), and wpa_start().

The Pairwise Transient Key derived from the handshake.

Definition at line 338 of file wpa.h.

Referenced by eapol_key_rx(), wpa_derive_ptk(), wpa_handle_1_of_2(), wpa_install_ptk(), and wpa_send_eapol().

The Group Transient Key derived from the handshake.

Definition at line 341 of file wpa.h.

Referenced by wpa_handle_1_of_2(), wpa_install_gtk(), and wpa_maybe_install_gtk().

Authenticator-provided nonce.

Definition at line 344 of file wpa.h.

Referenced by wpa_derive_ptk(), wpa_handle_1_of_4(), and wpa_handle_3_of_4().

Supplicant-generated nonce (that's us)

Definition at line 347 of file wpa.h.

Referenced by wpa_derive_ptk(), wpa_handle_1_of_4(), and wpa_send_2_of_4().

Whether we should refrain from generating another SNonce.

Definition at line 350 of file wpa.h.

Referenced by wpa_handle_1_of_4(), and wpa_handle_3_of_4().

Data in WPA or RSN IE from AP's beacon frame.

Definition at line 353 of file wpa.h.

Referenced by wpa_handle_3_of_4(), wpa_start(), and wpa_stop().

Length of ap_rsn_ie.

Definition at line 356 of file wpa.h.

Referenced by wpa_handle_3_of_4(), and wpa_start().

Whether ap_rsn_ie is an RSN IE (as opposed to old WPA)

Definition at line 359 of file wpa.h.

Referenced by wpa_handle_3_of_4(), and wpa_start().

List entry.

Definition at line 362 of file wpa.h.

Referenced by wpa_start(), and wpa_stop().


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