[PATCH 32/92] NAN: Add NIK KDE and Key lifetime KDE definitions

Andrei Otcheretianski andrei.otcheretianski at intel.com
Wed Apr 22 05:23:23 PDT 2026


From: Avraham Stern <avraham.stern at intel.com>

Add the NIK KDE and Key Lifetime KDE definitions.

Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
 src/common/nan_defs.h | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/src/common/nan_defs.h b/src/common/nan_defs.h
index 58bcb689df..b851d6219c 100644
--- a/src/common/nan_defs.h
+++ b/src/common/nan_defs.h
@@ -566,4 +566,32 @@ struct nan_shared_key {
 
 #define NAN_PASN_SSID "516F9A010000"
 
+/* See Table 126 (NAN KDE field format) */
+#define NAN_KEY_DATA_NIK RSN_SELECTOR(0x50, 0x6f, 0x9a, 36)
+#define NAN_KEY_DATA_LIFETIME RSN_SELECTOR(0x50, 0x6f, 0x9a, 37)
+
+/* See Figure 61 (NAN NIK KDE format).
+ * Note: The NIK field is defined with a variable length in Figure 61, but
+ * since only one cipher version is defined for now (which determines the
+ * length), use a fixed length here.
+ */
+struct nan_nik_kde {
+	u8 cipher_ver;
+	u8 nik[NAN_NIK_LEN];
+} STRUCT_PACKED;
+
+/* See Figure 63 (Key Bitmap format) */
+#define NAN_KEY_LIFETIME_GTK    BIT(0)
+#define NAN_KEY_LIFETIME_IGTK   BIT(1)
+#define NAN_KEY_LIFETIME_BIGTK  BIT(2)
+#define NAN_KEY_LIFETIME_NIK    BIT(3)
+#define NAN_KEY_LIFETIME_ND_TK  BIT(4)
+#define NAN_KEY_LIFETIME_NM_TK  BIT(5)
+
+/* See Figure 62 (NAN Key Lifetime KDE format) */
+struct nan_key_lifetime_kde {
+	le16 key_bitmap;
+	be32 lifetime_sec;
+} STRUCT_PACKED;
+
 #endif /* NAN_DEFS_H */
-- 
2.53.0




More information about the Hostap mailing list