]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE: Remove dead code in FFC pwd-value derivation
authorJouni Malinen <j@w1.fi>
Sun, 27 Mar 2016 18:28:45 +0000 (21:28 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 27 Mar 2016 18:28:45 +0000 (21:28 +0300)
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>
src/common/sae.c

index 6c00a7e380b7dadf75632014d263d97fb01d1a3d..f78437b130b4e530c004cb789649c2f4610b6df6 100644 (file)
@@ -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);