aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh_rsn.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-10-10 16:27:57 (GMT)
committerJouni Malinen <j@w1.fi>2016-10-10 16:40:59 (GMT)
commit325a85be366565c29ec0817857c3a80771461bf2 (patch)
tree37b8e6d8c2477d3de0777637a98e67c332dab2ea /wpa_supplicant/mesh_rsn.c
parente2991ee5807a1cc812615b354e0492c8a6453daf (diff)
downloadhostap-325a85be366565c29ec0817857c3a80771461bf2.zip
hostap-325a85be366565c29ec0817857c3a80771461bf2.tar.gz
hostap-325a85be366565c29ec0817857c3a80771461bf2.tar.bz2
Extend AES-SIV implementation to support different key lengths
The previous implementation was hardcoded to use 128-bit AES key (AEAD_AES_SIV_CMAC_256). Extend this by allowing AEAD_AES_SIV_CMAC_384 and AEAD_AES_SIV_CMAC_512 with 192-bit and 256-bit AES keys. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/mesh_rsn.c')
-rw-r--r--wpa_supplicant/mesh_rsn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wpa_supplicant/mesh_rsn.c b/wpa_supplicant/mesh_rsn.c
index 27ab8cb..fe60643 100644
--- a/wpa_supplicant/mesh_rsn.c
+++ b/wpa_supplicant/mesh_rsn.c
@@ -579,7 +579,7 @@ skip_keys:
/* encrypt after MIC */
mic_payload = wpabuf_put(buf, 2 + len + AES_BLOCK_SIZE);
- if (aes_siv_encrypt(sta->aek, ampe_ie, 2 + len, 3,
+ if (aes_siv_encrypt(sta->aek, sizeof(sta->aek), ampe_ie, 2 + len, 3,
aad, aad_len, mic_payload)) {
wpa_printf(MSG_ERROR, "protect frame: failed to encrypt");
ret = -ENOMEM;
@@ -650,7 +650,7 @@ int mesh_rsn_process_ampe(struct wpa_supplicant *wpa_s, struct sta_info *sta,
os_memcpy(crypt, elems->mic, crypt_len);
- if (aes_siv_decrypt(sta->aek, crypt, crypt_len, 3,
+ if (aes_siv_decrypt(sta->aek, sizeof(sta->aek), crypt, crypt_len, 3,
aad, aad_len, ampe_buf)) {
wpa_printf(MSG_ERROR, "Mesh RSN: frame verification failed!");
ret = -2;