Keep disclaiming 16-bit support.
authorAndy Polyakov <appro@openssl.org>
Fri, 23 Jan 2015 13:48:11 +0000 (14:48 +0100)
committerAndy Polyakov <appro@openssl.org>
Fri, 23 Jan 2015 18:09:01 +0000 (19:09 +0100)
If you examine changes, you are likely to wonder "but what about ILP64,
elusive as they are, don't they fall victim to 16-bit rationalization?"
No, the case was modeled and verified to work.

Reviewed-by: Rich Salz <rsalz@openssl.org>
CHANGES
crypto/bf/blowfish.h
crypto/md32_common.h
crypto/md4/md4.h
crypto/md4/md4_locl.h
crypto/md5/md5.h
crypto/md5/md5_locl.h
crypto/ripemd/ripemd.h
crypto/ripemd/rmd_locl.h
crypto/sha/sha.h

diff --git a/CHANGES b/CHANGES
index 9ebbe61bbb57682abc0b60642847cee21e31e30c..1a8538d70434bd6d97ab8cf4761536b203835e85 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -37,7 +37,7 @@
        NCR
        Tandem
        Cray
-       WIN16
+       16-bit platforms such as WIN16
      [Rich Salz]
 
   *) Start cleaning up OPENSSL_NO_xxx #define's
index f50a72559aff0be1d25b6c2b9bc6d1ec4496abfa..ae613e88b7e425314b43bd2897f159e460cbae4a 100644 (file)
@@ -74,19 +74,10 @@ extern "C" {
 
 /*-
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- * ! BF_LONG has to be at least 32 bits wide. If it's wider, then !
- * ! BF_LONG_LOG2 has to be defined along.                        !
+ * ! BF_LONG has to be at least 32 bits wide.                     !
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  */
-
-# if defined(__LP32__)
-#  define BF_LONG unsigned long
-# elif defined(__ILP64__)
-#  define BF_LONG unsigned long
-#  define BF_LONG_LOG2 3
-# else
-#  define BF_LONG unsigned int
-# endif
+# define BF_LONG unsigned int
 
 # define BF_ROUNDS       16
 # define BF_BLOCK        8
index 5d17b1348e9027d5dff93a6ac8c2b20a11681986..46c088cdf0bdc7a79ff225dc44d29a07c7121015 100644 (file)
@@ -64,8 +64,7 @@
  * HASH_CBLOCK
  *      size of a unit chunk HASH_BLOCK operates on.
  * HASH_LONG
- *      has to be at lest 32 bit wide, if it's wider, then
- *      HASH_LONG_LOG2 *has to* be defined along
+ *      has to be at lest 32 bit wide.
  * HASH_CTX
  *      context structure that at least contains following
  *      members:
@@ -98,7 +97,6 @@
  *      #define DATA_ORDER_IS_LITTLE_ENDIAN
  *
  *      #define HASH_LONG               MD5_LONG
- *      #define HASH_LONG_LOG2          MD5_LONG_LOG2
  *      #define HASH_CTX                MD5_CTX
  *      #define HASH_CBLOCK             MD5_CBLOCK
  *      #define HASH_UPDATE             MD5_Update
index d1d25d573cef2a4cf3704082d768115da35989e1..01052f339f548fb9b3442e52455875a67e59efc7 100644 (file)
@@ -72,19 +72,10 @@ extern "C" {
 
 /*-
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- * ! MD4_LONG has to be at least 32 bits wide. If it's wider, then !
- * ! MD4_LONG_LOG2 has to be defined along.                        !
+ * ! MD4_LONG has to be at least 32 bits wide.                     !
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  */
-
-# if defined(__LP32__)
-#  define MD4_LONG unsigned long
-# elif defined(__ILP64__)
-#  define MD4_LONG unsigned long
-#  define MD4_LONG_LOG2 3
-# else
-#  define MD4_LONG unsigned int
-# endif
+# define MD4_LONG unsigned int
 
 # define MD4_CBLOCK      64
 # define MD4_LBLOCK      (MD4_CBLOCK/4)
index dc86a86c56b1eb0392cf843baad1b1eaee973a2c..6ed21e13da191b4ea8cb84a522762e337179f701 100644 (file)
 #include <openssl/opensslconf.h>
 #include <openssl/md4.h>
 
-#ifndef MD4_LONG_LOG2
-# define MD4_LONG_LOG2 2        /* default to 32 bits */
-#endif
-
 void md4_block_data_order(MD4_CTX *c, const void *p, size_t num);
 
 #define DATA_ORDER_IS_LITTLE_ENDIAN
index 6f50c20297a74a47dc076ff6263a09b34b68bd8c..91f4251ece731eb1c88d51185d3650b7a2db05d2 100644 (file)
@@ -72,19 +72,10 @@ extern "C" {
 
 /*
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- * ! MD5_LONG has to be at least 32 bits wide. If it's wider, then !
- * ! MD5_LONG_LOG2 has to be defined along.                        !
+ * ! MD5_LONG has to be at least 32 bits wide.                     !
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  */
-
-# if defined(__LP32__)
-#  define MD5_LONG unsigned long
-# elif defined(__ILP64__)
-#  define MD5_LONG unsigned long
-#  define MD5_LONG_LOG2 3
-# else
-#  define MD5_LONG unsigned int
-# endif
+# define MD5_LONG unsigned int
 
 # define MD5_CBLOCK      64
 # define MD5_LBLOCK      (MD5_CBLOCK/4)
index 82e69218dae19dc18abeb87fa656a2b38aec2ca1..6c1bf35b804db782b275c0fd0efde7c537010ac9 100644 (file)
 #include <openssl/e_os2.h>
 #include <openssl/md5.h>
 
-#ifndef MD5_LONG_LOG2
-# define MD5_LONG_LOG2 2        /* default to 32 bits */
-#endif
-
 #ifdef MD5_ASM
 # if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) || \
      defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)
index 898f2d0d973d1f156a573a770c553e37be43ee24..9933078d6922b9a6caa4d934bef95f02f3b18950 100644 (file)
@@ -70,14 +70,7 @@ extern "C" {
 #  error RIPEMD is disabled.
 # endif
 
-# if defined(__LP32__)
-#  define RIPEMD160_LONG unsigned long
-# elif defined(__ILP64__)
-#  define RIPEMD160_LONG unsigned long
-#  define RIPEMD160_LONG_LOG2 3
-# else
-#  define RIPEMD160_LONG unsigned int
-# endif
+# define RIPEMD160_LONG unsigned int
 
 # define RIPEMD160_CBLOCK        64
 # define RIPEMD160_LBLOCK        (RIPEMD160_CBLOCK/4)
index 26e02563334c664040c6a5903811339fc21f6f25..497a1a167ed0c586aaadaf465bb243d2924bd3e3 100644 (file)
 #include <openssl/opensslconf.h>
 #include <openssl/ripemd.h>
 
-#ifndef RIPEMD160_LONG_LOG2
-# define RIPEMD160_LONG_LOG2 2  /* default to 32 bits */
-#endif
-
 /*
  * DO EXAMINE COMMENTS IN crypto/md5/md5_locl.h & crypto/md5/md5_dgst.c
  * FOR EXPLANATIONS ON FOLLOWING "CODE."
index 3d2d2fa136a7806a1c60722d010d720e7d226bfd..d76790b35a1cd1cd4fa0dcbe4d4fdf7909ca37e9 100644 (file)
@@ -72,19 +72,10 @@ extern "C" {
 
 /*-
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then !
- * ! SHA_LONG_LOG2 has to be defined along.                        !
+ * ! SHA_LONG has to be at least 32 bits wide.                    !
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  */
-
-# if defined(__LP32__)
-#  define SHA_LONG unsigned long
-# elif defined(__ILP64__)
-#  define SHA_LONG unsigned long
-#  define SHA_LONG_LOG2 3
-# else
-#  define SHA_LONG unsigned int
-# endif
+# define SHA_LONG unsigned int
 
 # define SHA_LBLOCK      16
 # define SHA_CBLOCK      (SHA_LBLOCK*4)/* SHA treats input data as a