[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20251214-rol32_in_md5-v1-1-20f5f11a92b2@kriptograf.id>
Date: Sun, 14 Dec 2025 18:15:12 +0700
From: "Rusydi H. Makarim" <rusydi.makarim@...ptograf.id>
To: Eric Biggers <ebiggers@...nel.org>,
"Jason A. Donenfeld" <Jason@...c4.com>, Ard Biesheuvel <ardb@...nel.org>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitor@...r.kernel.org,
"Rusydi H. Makarim" <rusydi.makarim@...ptograf.id>
Subject: [PATCH] lib/crypto: use rol32 in md5.c
use rol32 in MD5STEP
---
this patch replaces the bitwise left rotation in lib/crypto/md5.c
with rol32
Signed-off-by: Rusydi H. Makarim <rusydi.makarim@...ptograf.id>
---
lib/crypto/md5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/crypto/md5.c b/lib/crypto/md5.c
index c0610ea1370e..c4af57db0ea8 100644
--- a/lib/crypto/md5.c
+++ b/lib/crypto/md5.c
@@ -29,7 +29,7 @@ static const struct md5_block_state md5_iv = {
#define F4(x, y, z) (y ^ (x | ~z))
#define MD5STEP(f, w, x, y, z, in, s) \
- (w += f(x, y, z) + in, w = (w << s | w >> (32 - s)) + x)
+ (w += f(x, y, z) + in, w = rol32(w, s) + x)
static void md5_block_generic(struct md5_block_state *state,
const u8 data[MD5_BLOCK_SIZE])
---
base-commit: 3f9f0252130e7dd60d41be0802bf58f6471c691d
change-id: 20251214-rol32_in_md5-a3299000db10
Best regards,
--
Rusydi H. Makarim <rusydi.makarim@...ptograf.id>
Powered by blists - more mailing lists