diff mbox series

sae: prime_len means length in bytes not bits

Message ID 20231124143649.110325-1-juliusz@wolfssl.com
State Accepted
Headers show
Series sae: prime_len means length in bytes not bits | expand

Commit Message

Juliusz Sosinowicz Nov. 24, 2023, 2:36 p.m. UTC
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.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
---
 src/common/sae.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jouni Malinen Nov. 24, 2023, 4:58 p.m. UTC | #1
On Fri, Nov 24, 2023 at 03:36:49PM +0100, Juliusz Sosinowicz wrote:
> 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.

Thanks, applied.
diff mbox series

Patch

diff --git a/src/common/sae.c b/src/common/sae.c
index d4a196f153..f1c164e138 100644
--- a/src/common/sae.c
+++ b/src/common/sae.c
@@ -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);