History

cfg80211: AP mode driver offload for FILS association crypto

Add a driver FILS crypto offload extended capability flag to indicate that the driver running in AP mode is capable of handling encryption and decryption of (Re)Association request and response frames. Add a command to set FILS AAD data to driver. This feature is supported on drivers running in AP mode only. This extended capability is exchanged with hostapd during cfg80211 init. If the driver indicates this capability, then before sending the Authentication response frame, hostapd sets FILS AAD data to the driver. This allows the driver to decrypt (Re)Association Request frame and encrypt (Re)Association Response frame. FILS Key derivation will still be done in hostapd.

Subrat Mishra committed 5 years ago

Commit e3067841 parent cd8793f5 files · +134 −0Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+37−0
@@ -300,6 +300,29 @@ · 299 unmodified lines
300300 * the interface goes down.
301301 */
302302
303+/**
304+ * DOC: FILS shared key crypto offload
305+ *
306+ * This feature is applicable to drivers running in AP mode.
307+ *
308+ * FILS shared key crypto offload can be advertised by drivers by setting
309+ * @NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD flag. The drivers that support
310+ * FILS shared key crypto offload should be able to encrypt and decrypt
311+ * association frames for FILS shared key authentication as per IEEE 802.11ai.
312+ * With this capability, for FILS key derivation, drivers depend on userspace.
313+ *
314+ * After FILS key derivation, userspace shares the FILS AAD details with the
315+ * driver and the driver stores the same to use in decryption of association
316+ * request and in encryption of association response. The below parameters
317+ * should be given to the driver in %NL80211_CMD_SET_FILS_AAD.
318+ * %NL80211_ATTR_MAC - STA MAC address, used for storing FILS AAD per STA
319+ * %NL80211_ATTR_FILS_KEK - Used for encryption or decryption
320+ * %NL80211_ATTR_FILS_NONCES - Used for encryption or decryption
321+ * (STA Nonce 16 bytes followed by AP Nonce 16 bytes)
322+ *
323+ * Once the association is done, the driver cleans the FILS AAD data.
324+ */
325+
303326 /**
304327 * enum nl80211_commands - supported nl80211 commands
305328 *
@@ -1200,6 +1223,12 @@ · 894 unmodified lines
12001223 * @NL80211_CMD_COLOR_CHANGE_COMPLETED: Notify userland that the color change
12011224 * has completed
12021225 *
1226+ * @NL80211_CMD_SET_FILS_AAD: Set FILS AAD data to the driver using -
1227+ * &NL80211_ATTR_MAC - for STA MAC address
1228+ * &NL80211_ATTR_FILS_KEK - for KEK
1229+ * &NL80211_ATTR_FILS_NONCES - for FILS Nonces
1230+ * (STA Nonce 16 bytes followed by AP Nonce 16 bytes)
1231+ *
12031232 * @NL80211_CMD_MAX: highest used command number
12041233 * @__NL80211_CMD_AFTER_LAST: internal use
12051234 */
@@ -1440,6 +1469,8 @@ enum nl80211_commands { · 234 unmodified lines
14401469 NL80211_CMD_COLOR_CHANGE_ABORTED,
14411470 NL80211_CMD_COLOR_CHANGE_COMPLETED,
14421471
1472+ NL80211_CMD_SET_FILS_AAD,
1473+
14431474 /* add new commands above here */
14441475
14451476 /* used to define NL80211_CMD_MAX below */
@@ -5995,6 +6026,11 @@ enum nl80211_feature_flags { · 4549 unmodified lines
59956026 * @NL80211_EXT_FEATURE_BSS_COLOR: The driver supports BSS color collision
59966027 * detection and change announcemnts.
59976028 *
6029+ * @NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD: Driver running in AP mode supports
6030+ * FILS encryption and decryption for (Re)Association Request and Response
6031+ * frames. Userspace has to share FILS AAD details to the driver by using
6032+ * @NL80211_CMD_SET_FILS_AAD.
6033+ *
59986034 * @NUM_NL80211_EXT_FEATURES: number of extended features.
59996035 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
60006036 */
@@ -6060,6 +6096,7 @@ enum nl80211_ext_feature_index { · 59 unmodified lines
60606096 NL80211_EXT_FEATURE_SECURE_RTT,
60616097 NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE,
60626098 NL80211_EXT_FEATURE_BSS_COLOR,
6099+ NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD,
60636100
60646101 /* add new features before the definition below */
60656102 NUM_NL80211_EXT_FEATURES,