dot11decrypt: Fix KDF for larger PTK derivation
The key derivation function (Dot11DecryptRsnaKdfX) used for deriving PTK use some hard coded hash length values making it fail to generate full / correct PTK for 704 bit long PTK. Fix by replacing hard coded values with acutal hash length values. Ping-Bug: 16197 Change-Id: I48847cdb019672dde76174efb0f17514c58ace51 Reviewed-on: https://code.wireshark.org/review/35066 Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
5915613879
commit
b07dada4c9
|
@ -2274,12 +2274,12 @@ Dot11DecryptRsnaKdfX(
|
|||
memcpy(R + offset, &len_le, 2);
|
||||
offset += 2;
|
||||
|
||||
for (i = 0; i < (x + 255) / 256; i++)
|
||||
for (i = 0; i < (x + 255) / (hash_len * 8) ; i++)
|
||||
{
|
||||
guint16 count_le = GUINT16_TO_LE(i + 1);
|
||||
memcpy(R, &count_le, 2);
|
||||
|
||||
if (ws_hmac_buffer(hash_algo, &output[hash_len * i], R, offset, pmk, 32)) {
|
||||
if (ws_hmac_buffer(hash_algo, &output[hash_len * i], R, offset, pmk, hash_len)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue