TDLS: Update the comments related to TPK derivation

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>
This commit is contained in:
Jouni Malinen 2017-09-22 10:21:28 +03:00 committed by Jouni Malinen
parent f41f04d04c
commit 29c940e7a6

View 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) {