From a44744d3bba8cb2cb0deb0405d347923fe6901f4 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 22 May 2022 11:07:05 +0300 Subject: [PATCH] tests: Set ECB mode for AES explicitly to work with cryptodome AES.new() needs the mode to be set explicitly. Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_psk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/hwsim/test_ap_psk.py b/tests/hwsim/test_ap_psk.py index 652eae4a8..e9c7d5adc 100644 --- a/tests/hwsim/test_ap_psk.py +++ b/tests/hwsim/test_ap_psk.py @@ -1763,7 +1763,7 @@ def build_eapol_key_3_4(anonce, kck, key_data, replay_counter=2, def aes_wrap(kek, plain): n = len(plain) // 8 a = 0xa6a6a6a6a6a6a6a6 - enc = AES.new(kek).encrypt + enc = AES.new(kek, AES.MODE_ECB).encrypt r = [plain[i * 8:(i + 1) * 8] for i in range(0, n)] for j in range(6): for i in range(1, n + 1): -- 2.47.2