eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 90c39afd61080e25ba18d5558378934d75da3ba7
parent 532c9a55210f11c1dc6f75cff4be21f2b334da78
Author: James Prestwood <james.prestwood@linux.intel.com>
Date:   Thu, 17 Jan 2019 12:25:35 -0800

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.

Diffstat:
Msrc/handshake.c | 29+++++++++++++++++++++++++++++
1 file changed, 29 insertions(+), 0 deletions(-)

diff --git a/src/handshake.c b/src/handshake.c @@ -303,6 +303,35 @@ static bool handshake_get_key_sizes(struct handshake_state *s, size_t *ptk_size, 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; kek = 16;