summaryrefslogtreecommitdiff
path: root/lib/libcrypto/md4
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2024-03-28 08:00:09 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2024-03-28 08:00:09 +0000
commit60ff034ea78920a78e043852dbcf6cd6c339890d (patch)
treec12e7081aef788ec9e2f786d9434c88b6ec6b728 /lib/libcrypto/md4
parentcbf22e464f934837fe6f171090cea321556ab3d6 (diff)
Load in the top of the loop, as we do for other hash implementations.
Diffstat (limited to 'lib/libcrypto/md4')
-rw-r--r--lib/libcrypto/md4/md4.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/libcrypto/md4/md4.c b/lib/libcrypto/md4/md4.c
index f25595c1550..42c5b214280 100644
--- a/lib/libcrypto/md4/md4.c
+++ b/lib/libcrypto/md4/md4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: md4.c,v 1.16 2024/03/27 06:15:18 jsing Exp $ */
+/* $OpenBSD: md4.c,v 1.17 2024/03/28 08:00:07 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -118,12 +118,12 @@ md4_block_data_order(MD4_CTX *c, const void *_in, size_t num)
unsigned int X0, X1, X2, X3, X4, X5, X6, X7,
X8, X9, X10, X11, X12, X13, X14, X15;
- A = c->A;
- B = c->B;
- C = c->C;
- D = c->D;
-
while (num-- > 0) {
+ A = c->A;
+ B = c->B;
+ C = c->C;
+ D = c->D;
+
if ((uintptr_t)in % 4 == 0) {
/* Input is 32 bit aligned. */
in32 = (const MD4_LONG *)in;
@@ -217,10 +217,10 @@ md4_block_data_order(MD4_CTX *c, const void *_in, size_t num)
md4_round3(&C, D, A, B, X7, 11);
md4_round3(&B, C, D, A, X15, 15);
- A = c->A += A;
- B = c->B += B;
- C = c->C += C;
- D = c->D += D;
+ c->A += A;
+ c->B += B;
+ c->C += C;
+ c->D += D;
}
}