]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
TDLS: Update the comments related to TPK derivation
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 22 Sep 2017 07:21:28 +0000 (10:21 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 22 Sep 2017 07:23:35 +0000 (10:23 +0300)
Update these comments based on IEEE Std 802.11-2016 to get rid of the
already resolved TODO comment regarding duplicated N_KEY use. The
implementation does not need any changes since it was already following
the fixed version in the current standard.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/rsn_supp/tdls.c

index 8437a9b166e9a9bfb40c5204d84edc6fe3b0c0e0..7c95bed8ab35095f9ee1bb9e189a6dd46cea9253 100644 (file)
@@ -394,8 +394,9 @@ static void wpa_tdls_generate_tpk(struct wpa_tdls_peer *peer,
        size_t len[2];
        u8 data[3 * ETH_ALEN];
 
-       /* IEEE Std 802.11z-2010 8.5.9.1:
-        * TPK-Key-Input = SHA-256(min(SNonce, ANonce) || max(SNonce, ANonce))
+       /* IEEE Std 802.11-2016 12.7.9.2:
+        * TPK-Key-Input = Hash(min(SNonce, ANonce) || max(SNonce, ANonce))
+        * Hash = SHA-256 for TDLS
         */
        len[0] = WPA_NONCE_LEN;
        len[1] = WPA_NONCE_LEN;
@@ -413,11 +414,8 @@ static void wpa_tdls_generate_tpk(struct wpa_tdls_peer *peer,
                        key_input, SHA256_MAC_LEN);
 
        /*
-        * TPK-Key-Data = KDF-N_KEY(TPK-Key-Input, "TDLS PMK",
-        *      min(MAC_I, MAC_R) || max(MAC_I, MAC_R) || BSSID || N_KEY)
-        * TODO: is N_KEY really included in KDF Context and if so, in which
-        * presentation format (little endian 16-bit?) is it used? It gets
-        * added by the KDF anyway..
+        * TPK = KDF-Hash-Length(TPK-Key-Input, "TDLS PMK",
+        *      min(MAC_I, MAC_R) || max(MAC_I, MAC_R) || BSSID)
         */
 
        if (os_memcmp(own_addr, peer->addr, ETH_ALEN) < 0) {