-/* $OpenBSD: md32_common.h,v 1.25 2023/05/27 18:33:34 jsing Exp $ */
+/* $OpenBSD: md32_common.h,v 1.26 2023/08/10 07:15:23 jsing Exp $ */
/* ====================================================================
* Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
*
return 1;
}
#endif
-
-#ifndef MD32_REG_T
-#if defined(__alpha) || defined(__sparcv9) || defined(__mips)
-#define MD32_REG_T long
-/*
- * This comment was originally written for MD5, which is why it
- * discusses A-D. But it basically applies to all 32-bit digests,
- * which is why it was moved to common header file.
- *
- * In case you wonder why A-D are declared as long and not
- * as MD5_LONG. Doing so results in slight performance
- * boost on LP64 architectures. The catch is we don't
- * really care if 32 MSBs of a 64-bit register get polluted
- * with eventual overflows as we *save* only 32 LSBs in
- * *either* case. Now declaring 'em long excuses the compiler
- * from keeping 32 MSBs zeroed resulting in 13% performance
- * improvement under SPARC Solaris7/64 and 5% under AlphaLinux.
- * Well, to be honest it should say that this *prevents*
- * performance degradation.
- * <appro@fy.chalmers.se>
- */
-#else
-/*
- * Above is not absolute and there are LP64 compilers that
- * generate better code if MD32_REG_T is defined int. The above
- * pre-processor condition reflects the circumstances under which
- * the conclusion was made and is subject to further extension.
- * <appro@fy.chalmers.se>
- */
-#define MD32_REG_T int
-#endif
-#endif
-/* $OpenBSD: md4.c,v 1.5 2023/07/28 11:04:41 jsing Exp $ */
+/* $OpenBSD: md4.c,v 1.6 2023/08/10 07:15:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
md4_block_data_order(MD4_CTX *c, const void *data_, size_t num)
{
const unsigned char *data = data_;
- unsigned MD32_REG_T A, B, C, D, l;
- unsigned MD32_REG_T X0, X1, X2, X3, X4, X5, X6, X7,
+ unsigned int A, B, C, D, l;
+ unsigned int X0, X1, X2, X3, X4, X5, X6, X7,
X8, X9, X10, X11, X12, X13, X14, X15;
A = c->A;
-/* $OpenBSD: md5.c,v 1.6 2023/07/28 11:06:28 jsing Exp $ */
+/* $OpenBSD: md5.c,v 1.7 2023/08/10 07:15:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
md5_block_data_order(MD5_CTX *c, const void *data_, size_t num)
{
const unsigned char *data = data_;
- unsigned MD32_REG_T A, B, C, D, l;
- unsigned MD32_REG_T X0, X1, X2, X3, X4, X5, X6, X7,
+ unsigned int A, B, C, D, l;
+ unsigned int X0, X1, X2, X3, X4, X5, X6, X7,
X8, X9, X10, X11, X12, X13, X14, X15;
A = c->A;
-/* $OpenBSD: ripemd.c,v 1.1 2023/07/28 11:08:01 jsing Exp $ */
+/* $OpenBSD: ripemd.c,v 1.2 2023/08/10 07:15:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
ripemd160_block_data_order(RIPEMD160_CTX *ctx, const void *p, size_t num)
{
const unsigned char *data = p;
- unsigned MD32_REG_T A, B,C, D, E;
- unsigned MD32_REG_T a, b,c, d,e, l;
+ unsigned int A, B, C, D, E;
+ unsigned int a, b, c, d, e, l;
#ifndef MD32_XARRAY
/* See comment in crypto/sha/sha_locl.h for details. */
- unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
+ unsigned int XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
XX8, XX9, XX10, XX11, XX12, XX13, XX14, XX15;
# define X(i) XX##i
#else
-/* $OpenBSD: sha1.c,v 1.11 2023/07/08 12:24:10 beck Exp $ */
+/* $OpenBSD: sha1.c,v 1.12 2023/08/10 07:15:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
sha1_block_data_order(SHA_CTX *c, const void *p, size_t num)
{
const unsigned char *data = p;
- unsigned MD32_REG_T A, B, C, D, E, T, l;
- unsigned MD32_REG_T X0, X1, X2, X3, X4, X5, X6, X7,
+ unsigned int A, B, C, D, E, T, l;
+ unsigned int X0, X1, X2, X3, X4, X5, X6, X7,
X8, X9, X10, X11, X12, X13, X14, X15;
A = c->h0;
-/* $OpenBSD: sha256.c,v 1.27 2023/07/08 12:24:10 beck Exp $ */
+/* $OpenBSD: sha256.c,v 1.28 2023/08/10 07:15:23 jsing Exp $ */
/* ====================================================================
* Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
*
{
const uint8_t *in = _in;
const SHA_LONG *in32;
- unsigned MD32_REG_T a, b, c, d, e, f, g, h, s0, s1, T1;
+ unsigned int a, b, c, d, e, f, g, h, s0, s1, T1;
SHA_LONG X[16];
int i;