]> git.ipfire.org Git - thirdparty/hostap.git/commit
SAE: Fix KCK, PMK, and PMKID derivation for groups 22, 23, 24
authorJouni Malinen <j@w1.fi>
Sat, 3 Aug 2019 14:00:39 +0000 (17:00 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 3 Aug 2019 14:00:39 +0000 (17:00 +0300)
commitac734a342ed172a07714dbbf71bcac4b379a0b9b
treedd8551af4b7a6741d2ef7faf97dbe527b7397e31
parente57e3f12b4639ace1420bc3a921034ab31299fa8
SAE: Fix KCK, PMK, and PMKID derivation for groups 22, 23, 24

IEEE Std 802.11-2016 is not exactly clear on the encoding of the bit
string that is needed for KCK, PMK, and PMKID derivation, but it seems
to make most sense to encode the (commit-scalar + peer-commit-scalar)
mod r part as a bit string by zero padding it from left to the length of
the order (in full octets).

The previous implementation used the length of the prime (in full
octets). This would work for KCK/PMK, but this results in deriving all
zero PMKIDs for the groups where the size of the order is smaller than
the size of the prime. This is the case for groups 22, 23, and 24.
However, those groups have been marked as being unsuitable for use with
SAE, so this fix should not really have a practical impact anymore.
Anyway, better fix it and document this clearly in the implementation
taken into account the unclarity of the standard in this area.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/common/sae.c
src/common/sae.h