aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-03-27 18:28:45 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-27 18:28:45 (GMT)
commitea86a3466718a82a7b9960b07c5630ba213ea787 (patch)
treefb7ecccfe6d9e6c50f4fad250657e31ee481fa6b
parent03aac597a051c4ea77288147c92d43c8c1f3c8b9 (diff)
downloadhostap-ea86a3466718a82a7b9960b07c5630ba213ea787.zip
hostap-ea86a3466718a82a7b9960b07c5630ba213ea787.tar.gz
hostap-ea86a3466718a82a7b9960b07c5630ba213ea787.tar.bz2
SAE: Remove dead code in FFC pwd-value derivation
The local bits variable is set to prime_len * 8 and consequently bits % 8 cannot be anything else than 0. Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--src/common/sae.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/common/sae.c b/src/common/sae.c
index 6c00a7e..f78437b 100644
--- a/src/common/sae.c
+++ b/src/common/sae.c
@@ -321,8 +321,6 @@ static int sae_test_pwd_seed_ffc(struct sae_data *sae, const u8 *pwd_seed,
sha256_prf_bits(pwd_seed, SHA256_MAC_LEN, "SAE Hunting and Pecking",
sae->tmp->dh->prime, sae->tmp->prime_len, pwd_value,
bits);
- if (bits % 8)
- buf_shift_right(pwd_value, sizeof(pwd_value), 8 - bits % 8);
wpa_hexdump_key(MSG_DEBUG, "SAE: pwd-value", pwd_value,
sae->tmp->prime_len);