Skip to content

Commit

Permalink
wpa_supplicant: Reduce logging for SAE
Browse files Browse the repository at this point in the history
  • Loading branch information
ShyamalKhachane committed May 4, 2023
1 parent 3775ce8 commit 032305a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/wpa_supplicant/src/common/sae.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static int sae_test_pwd_seed_ecc(struct sae_data *sae, const u8 *pwd_seed,
int cmp_prime;
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) */
bits = crypto_ec_prime_len_bits(sae->tmp->ec);
Expand All @@ -150,7 +150,7 @@ static int sae_test_pwd_seed_ecc(struct sae_data *sae, const u8 *pwd_seed,
return ESP_FAIL;
if (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);

cmp_prime = const_time_memcmp(pwd_value, prime, sae->tmp->prime_len);
Expand Down Expand Up @@ -348,7 +348,7 @@ static int sae_derive_pwe_ecc(struct sae_data *sae, const u8 *addr1,
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,
password_len, tmp_password);
if (hmac_sha256_vector(addrs, sizeof(addrs), 2,
Expand All @@ -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.
*/
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);
}

Expand Down

0 comments on commit 032305a

Please sign in to comment.