From 09565068c32c5b4345c7471e5c3359763c17a5f4 Mon Sep 17 00:00:00 2001 From: HelenHZhang Date: Mon, 12 Feb 2024 09:11:51 -0500 Subject: [PATCH] Update dh.c here, converting bytes to u64, we need to right shift 3, not 6. --- crypto/dh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/dh.c b/crypto/dh.c index 0fcad279e6fe9..d6544cce44bef 100644 --- a/crypto/dh.c +++ b/crypto/dh.c @@ -372,7 +372,7 @@ static void *dh_safe_prime_gen_privkey(const struct dh_safe_prime *safe_prime, */ n = roundup_pow_of_two(2 * safe_prime->max_strength); WARN_ON_ONCE(n & ((1u << 6) - 1)); - n >>= 6; /* Convert N into units of u64. */ + n >>= 3; /* Convert N into units of u64. */ /* * Reserve one extra u64 to hold the extra random bits