aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-09-09 09:26:22 (GMT)
committerJouni Malinen <j@w1.fi>2012-09-09 10:30:51 (GMT)
commitd140db6adf7b3b439f71e1ac2c72e637157bfc4a (patch)
tree2f6ebedbeffa1391a13635fac0c914cf8d92c79d /wlantest
parentaf0963fab42804328294bba7a36a976814369aca (diff)
downloadhostap-d140db6adf7b3b439f71e1ac2c72e637157bfc4a.zip
hostap-d140db6adf7b3b439f71e1ac2c72e637157bfc4a.tar.gz
hostap-d140db6adf7b3b439f71e1ac2c72e637157bfc4a.tar.bz2
Add support for using 192-bit and 256-bit keys with AES-GCM
This adds 192-bit and 256-bit key support to the internal AES implementation and extends the AES-GCM functions to accept key length to enable longer AES key use. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wlantest')
-rw-r--r--wlantest/gcmp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/wlantest/gcmp.c b/wlantest/gcmp.c
index e0245db..5639b7e 100644
--- a/wlantest/gcmp.c
+++ b/wlantest/gcmp.c
@@ -95,8 +95,8 @@ u8 * gcmp_decrypt(const u8 *tk, const struct ieee80211_hdr *hdr,
wpa_hexdump(MSG_EXCESSIVE, "GCMP AAD", aad, aad_len);
wpa_hexdump(MSG_EXCESSIVE, "GCMP nonce", nonce, sizeof(nonce));
- if (aes_128_gcm_ad(tk, nonce, sizeof(nonce), m, mlen, aad, aad_len,
- m + mlen, plain) < 0) {
+ if (aes_gcm_ad(tk, 16, nonce, sizeof(nonce), m, mlen, aad, aad_len,
+ m + mlen, plain) < 0) {
u16 seq_ctrl = le_to_host16(hdr->seq_ctrl);
wpa_printf(MSG_INFO, "Invalid GCMP frame: A1=" MACSTR
" A2=" MACSTR " A3=" MACSTR " seq=%u frag=%u",
@@ -146,8 +146,8 @@ u8 * gcmp_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen, u8 *qos,
wpa_hexdump(MSG_EXCESSIVE, "GCMP AAD", aad, aad_len);
wpa_hexdump(MSG_EXCESSIVE, "GCMP nonce", nonce, sizeof(nonce));
- if (aes_128_gcm_ae(tk, nonce, sizeof(nonce), frame + hdrlen, plen, aad,
- aad_len, pos, pos + plen) < 0) {
+ if (aes_gcm_ae(tk, 16, nonce, sizeof(nonce), frame + hdrlen, plen, aad,
+ aad_len, pos, pos + plen) < 0) {
os_free(crypt);
return NULL;
}