diff options
author | Jouni Malinen <j@w1.fi> | 2008-12-14 13:12:20 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2008-12-14 13:12:20 +0200 |
commit | 000a1de72b20a461710667477b98618ad545e941 (patch) | |
tree | 476bdd6eda7cfaddd186cfd8de9466e436289015 /src/eap_server/eap_mschapv2.c | |
parent | 6e783c6da9eab625732762e7d534159cb02b460c (diff) | |
download | external_wpa_supplicant_8_ti-000a1de72b20a461710667477b98618ad545e941.zip external_wpa_supplicant_8_ti-000a1de72b20a461710667477b98618ad545e941.tar.gz external_wpa_supplicant_8_ti-000a1de72b20a461710667477b98618ad545e941.tar.bz2 |
Cleaned up EAP-MSCHAPv2 key derivation
Changed peer to derive the full key (both MS-MPPE-Recv-Key and
MS-MPPE-Send-Key for total of 32 octets) to match with server
implementation.
Swapped the order of MPPE keys in MSK derivation since server
MS-MPPE-Recv-Key | MS-MPPE-Send-Key matches with the order specified for
EAP-TLS MSK derivation. This means that PEAPv0 cryptobinding is now
using EAP-MSCHAPv2 MSK as-is for ISK while EAP-FAST will need to swap
the order of the MPPE keys to get ISK in a way that interoperates with
Cisco EAP-FAST implementation.
Diffstat (limited to 'src/eap_server/eap_mschapv2.c')
-rw-r--r-- | src/eap_server/eap_mschapv2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/eap_server/eap_mschapv2.c b/src/eap_server/eap_mschapv2.c index f83421f..20e7ade 100644 --- a/src/eap_server/eap_mschapv2.c +++ b/src/eap_server/eap_mschapv2.c @@ -524,9 +524,10 @@ static u8 * eap_mschapv2_getKey(struct eap_sm *sm, void *priv, size_t *len) key = os_malloc(*len); if (key == NULL) return NULL; - get_asymetric_start_key(data->master_key, key, MSCHAPV2_KEY_LEN, 0, 0); + /* MSK = server MS-MPPE-Recv-Key | MS-MPPE-Send-Key */ + get_asymetric_start_key(data->master_key, key, MSCHAPV2_KEY_LEN, 0, 1); get_asymetric_start_key(data->master_key, key + MSCHAPV2_KEY_LEN, - MSCHAPV2_KEY_LEN, 1, 0); + MSCHAPV2_KEY_LEN, 1, 1); wpa_hexdump_key(MSG_DEBUG, "EAP-MSCHAPV2: Derived key", key, *len); return key; |