mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
AES-GCM: Use os_memcmp_const() for hash/password comparisons
This makes the implementation less likely to provide useful timing information to potential attackers from comparisons of information received from a remote device and private material known only by the authorized devices. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
87a5c93bec
commit
05f916eeed
@ -310,7 +310,7 @@ int aes_gcm_ad(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len,
|
||||
|
||||
aes_encrypt_deinit(aes);
|
||||
|
||||
if (os_memcmp(tag, T, 16) != 0) {
|
||||
if (os_memcmp_const(tag, T, 16) != 0) {
|
||||
wpa_printf(MSG_EXCESSIVE, "GCM: Tag mismatch");
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user