]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE: prime_len means length in bytes not bits
authorJuliusz Sosinowicz <juliusz@wolfssl.com>
Fri, 24 Nov 2023 14:36:49 +0000 (15:36 +0100)
committerJouni Malinen <j@w1.fi>
Fri, 24 Nov 2023 16:07:34 +0000 (18:07 +0200)
The prime_len variable is used as the length in bytes but it is set as
the length in bits. This fixes the sae DH group tests with wolfSSL.

Fixes: f8f20717f87e ("SAE: Use const_time selection for PWE in FFC")
Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
src/common/sae.c

index d4a196f153fd27a20db406e2bfdd5eda9ba74243..f1c164e13838010f54c244d5f73dbe87c0e09ae4 100644 (file)
@@ -458,7 +458,7 @@ static int sae_derive_pwe_ffc(struct sae_data *sae, const u8 *addr1,
                       * mask */
        u8 mask;
        struct crypto_bignum *pwe;
-       size_t prime_len = sae->tmp->prime_len * 8;
+       size_t prime_len = sae->tmp->prime_len;
        u8 *pwe_buf;
 
        crypto_bignum_deinit(sae->tmp->pwe_ffc, 1);