mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
handshake: add OWE to get_ptk_size
OWE defines KEK/KCK lengths depending on group. This change adds a case into handshake_get_key_sizes. With OWE we can determine the key lengths based on the PMK length in the handshake.
This commit is contained in:
parent
532c9a5521
commit
90c39afd61
@ -302,6 +302,35 @@ static bool handshake_get_key_sizes(struct handshake_state *s, size_t *ptk_size,
|
||||
case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
|
||||
kck = 24;
|
||||
kek = 32;
|
||||
break;
|
||||
case IE_RSN_AKM_SUITE_OWE:
|
||||
/*
|
||||
* RFC 8110 Section 4.4 Table 2
|
||||
*
|
||||
* Luckily with OWE we can deduce the key lengths from the PMK
|
||||
* size, since the PMK size maps to unique KCK/KEK lengths.
|
||||
*/
|
||||
switch (s->pmk_len) {
|
||||
case 32:
|
||||
/* SHA-256 used for PMK */
|
||||
kck = 16;
|
||||
kek = 16;
|
||||
break;
|
||||
case 48:
|
||||
/* SHA-384 used for PMK */
|
||||
kck = 24;
|
||||
kek = 32;
|
||||
break;
|
||||
case 64:
|
||||
/* SHA-512 used for PMK */
|
||||
kck = 32;
|
||||
kek = 32;
|
||||
break;
|
||||
default:
|
||||
l_error("Invalid PMK length for OWE %zu\n", s->pmk_len);
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
kck = 16;
|
||||
|
Loading…
Reference in New Issue
Block a user