mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
Merge branch 'bugfix/reduce_logging_for_SAE' into 'release/v5.1'
Modify log level for SAE (Backport v5.1) See merge request espressif/esp-idf!23547
This commit is contained in:
@ -141,7 +141,7 @@ static int sae_test_pwd_seed_ecc(struct sae_data *sae, const u8 *pwd_seed,
|
|||||||
int cmp_prime;
|
int cmp_prime;
|
||||||
unsigned int in_range;
|
unsigned int in_range;
|
||||||
|
|
||||||
wpa_hexdump_key(MSG_DEBUG, "SAE: pwd-seed", pwd_seed, SHA256_MAC_LEN);
|
wpa_hexdump_key(MSG_MSGDUMP, "SAE: pwd-seed", pwd_seed, SHA256_MAC_LEN);
|
||||||
|
|
||||||
/* pwd-value = KDF-z(pwd-seed, "SAE Hunting and Pecking", p) */
|
/* pwd-value = KDF-z(pwd-seed, "SAE Hunting and Pecking", p) */
|
||||||
bits = crypto_ec_prime_len_bits(sae->tmp->ec);
|
bits = crypto_ec_prime_len_bits(sae->tmp->ec);
|
||||||
@ -150,7 +150,7 @@ static int sae_test_pwd_seed_ecc(struct sae_data *sae, const u8 *pwd_seed,
|
|||||||
return ESP_FAIL;
|
return ESP_FAIL;
|
||||||
if (bits % 8)
|
if (bits % 8)
|
||||||
buf_shift_right(pwd_value, sae->tmp->prime_len, 8 - bits % 8);
|
buf_shift_right(pwd_value, sae->tmp->prime_len, 8 - bits % 8);
|
||||||
wpa_hexdump_key(MSG_DEBUG, "SAE: pwd-value",
|
wpa_hexdump_key(MSG_MSGDUMP, "SAE: pwd-value",
|
||||||
pwd_value, sae->tmp->prime_len);
|
pwd_value, sae->tmp->prime_len);
|
||||||
|
|
||||||
cmp_prime = const_time_memcmp(pwd_value, prime, sae->tmp->prime_len);
|
cmp_prime = const_time_memcmp(pwd_value, prime, sae->tmp->prime_len);
|
||||||
@ -348,7 +348,7 @@ static int sae_derive_pwe_ecc(struct sae_data *sae, const u8 *addr1,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "SAE: counter = %03u", counter);
|
wpa_printf(MSG_MSGDUMP, "SAE: counter = %03u", counter);
|
||||||
const_time_select_bin(found, stub_password, password,
|
const_time_select_bin(found, stub_password, password,
|
||||||
password_len, tmp_password);
|
password_len, tmp_password);
|
||||||
if (hmac_sha256_vector(addrs, sizeof(addrs), 2,
|
if (hmac_sha256_vector(addrs, sizeof(addrs), 2,
|
||||||
@ -375,7 +375,7 @@ static int sae_derive_pwe_ecc(struct sae_data *sae, const u8 *addr1,
|
|||||||
* (with res converted to 0/0xff) handles this in constant time.
|
* (with res converted to 0/0xff) handles this in constant time.
|
||||||
*/
|
*/
|
||||||
found |= res * 0xff;
|
found |= res * 0xff;
|
||||||
wpa_printf(MSG_DEBUG, "SAE: pwd-seed result %d found=0x%02x",
|
wpa_printf(MSG_MSGDUMP, "SAE: pwd-seed result %d found=0x%02x",
|
||||||
res, found);
|
res, found);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user