boringssl/crypto
Brian Smith 00461cf201 Improve crypto/digest/md32_common.h mechanism.
The documentation in md32_common.h is now (more) correct with respect
to the most important details of the layout of |HASH_CTX|. The
documentation explaining why sha512.c doesn't use md32_common.h is now
more accurate as well.

Before, the C implementations of HASH_BLOCK_DATA_ORDER took a pointer
to the |HASH_CTX| and the assembly language implementations tool a
pointer to the hash state |h| member of |HASH_CTX|. (This worked
because |h| is always the first member of |HASH_CTX|.) Now, the C
implementations take a pointer directly to |h| too.

The definitions of |MD4_CTX|, |MD5_CTX|, and |SHA1_CTX| were changed to
be consistent with |SHA256_CTX| and |SHA512_CTX| in storing the hash
state in an array. This will break source compatibility with any
external code that accesses the hash state directly, but will not
affect binary compatibility.

The second parameter of |HASH_BLOCK_DATA_ORDER| is now of type
|const uint8_t *|; previously it was |void *| and all implementations
had a |uint8_t *data| variable to access it as an array of bytes.

This change paves the way for future refactorings such as automatically
generating the |*_Init| functions and/or sharing one I-U-F
implementation across all digest algorithms.

Change-Id: I30513bb40b5f1d2c8932551d54073c35484b3f8b
Reviewed-on: https://boringssl-review.googlesource.com/6401
Reviewed-by: Adam Langley <agl@google.com>
2015-11-03 02:04:38 +00:00
..
aes Fix the shared builders by exporting GCM symbols. 2015-10-26 23:26:40 +00:00
asn1 Fix several warnings that arise in Android. 2015-10-30 21:11:48 +00:00
base64 Add a run_tests target to run all tests. 2015-10-26 20:33:44 +00:00
bio Fix several warnings that arise in Android. 2015-10-30 21:11:48 +00:00
bn Make BN_mod_exp_mont_consttime take a const context. 2015-11-03 01:58:12 +00:00
buf Make |BUF_memdup| look for zero length, not NULL. 2015-10-06 18:11:33 -07:00
bytestring Add a run_tests target to run all tests. 2015-10-26 20:33:44 +00:00
chacha Change |CRYPTO_chacha_20| to use 96-bit nonces, 32-bit counters. 2015-10-26 23:58:46 +00:00
cipher Improve crypto/digest/md32_common.h mechanism. 2015-11-03 02:04:38 +00:00
cmac Add a run_tests target to run all tests. 2015-10-26 20:33:44 +00:00
conf Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
des Fix shared library build on OS X. 2015-10-26 23:39:47 +00:00
dh Fix all sign/unsigned warnings with Clang and GCC. 2015-10-27 22:48:00 +00:00
digest Improve crypto/digest/md32_common.h mechanism. 2015-11-03 02:04:38 +00:00
dsa Add a run_tests target to run all tests. 2015-10-26 20:33:44 +00:00
ec Fix all sign/unsigned warnings with Clang and GCC. 2015-10-27 22:48:00 +00:00
ecdh Clean up |ECDH_compute_key|. 2015-10-27 17:00:25 +00:00
ecdsa Add a run_tests target to run all tests. 2015-10-26 20:33:44 +00:00
engine Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
err Fix all sign/unsigned warnings with Clang and GCC. 2015-10-27 22:48:00 +00:00
evp Fix several warnings that arise in Android. 2015-10-30 21:11:48 +00:00
hkdf Add a run_tests target to run all tests. 2015-10-26 20:33:44 +00:00
hmac Add a run_tests target to run all tests. 2015-10-26 20:33:44 +00:00
lhash Add a run_tests target to run all tests. 2015-10-26 20:33:44 +00:00
md4 Improve crypto/digest/md32_common.h mechanism. 2015-11-03 02:04:38 +00:00
md5 Improve crypto/digest/md32_common.h mechanism. 2015-11-03 02:04:38 +00:00
modes Get rid of all compiler version checks in perlasm files. 2015-10-28 19:33:04 +00:00
obj Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
pem Fix all sign/unsigned warnings with Clang and GCC. 2015-10-27 22:48:00 +00:00
perlasm Get rid of all compiler version checks in perlasm files. 2015-10-28 19:33:04 +00:00
pkcs8 Fix PKCS#8 on 32-bit systems. 2015-10-27 16:18:51 -07:00
poly1305 Fix several warnings that arise in Android. 2015-10-30 21:11:48 +00:00
rand Change |CRYPTO_chacha_20| to use 96-bit nonces, 32-bit counters. 2015-10-26 23:58:46 +00:00
rc4 Fix a couple more signed/unsigned compares. 2015-10-27 16:07:26 -07:00
rsa Switch rsa_test.cc to use the new RSA encrypt/decrypt API. 2015-10-28 23:36:44 +00:00
sha Improve crypto/digest/md32_common.h mechanism. 2015-11-03 02:04:38 +00:00
stack Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
test Convert ssl3_send_client_hello to CBB. 2015-10-20 17:56:19 +00:00
x509 Fix all sign/unsigned warnings with Clang and GCC. 2015-10-27 22:48:00 +00:00
x509v3 Fix several warnings that arise in Android. 2015-10-30 21:11:48 +00:00
CMakeLists.txt Add a run_tests target to run all tests. 2015-10-26 20:33:44 +00:00
constant_time_test.c
cpu-arm-asm.S
cpu-arm.c Allow ARM capabilities to be set at compile time. 2015-10-20 22:40:15 +00:00
cpu-intel.c Surround immintrin.h includes with warning pragmas. 2015-07-20 20:08:26 +00:00
crypto.c Add no-op functions |CRYPTO_malloc_init| and |ENGINE_load_builtin_engines|. 2015-10-27 16:41:40 +00:00
directory_posix.c
directory_win.c
directory.h
ex_data.c Reserve ex_data index zero for app_data. 2015-07-20 16:56:34 +00:00
header_removed.h
internal.h Buffer reads of urandom, if you promise no forking. 2015-09-09 01:02:54 +00:00
mem.c Fix some typos in license headers. 2015-07-29 19:23:51 +00:00
refcount_c11.c Cast refcounts to _Atomic before use. 2015-05-20 13:39:22 -07:00
refcount_lock.c Add infrastructure for reference counts. 2015-05-20 19:14:59 +00:00
refcount_test.c Specify argc and argv arguments to refcount_test:main. 2015-05-20 13:49:41 -07:00
thread_none.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread_pthread.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread_test.c Use the correct case for Windows headers. 2015-06-09 21:38:04 +00:00
thread_win.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread.c Remove leftovers of the old-style locks. 2015-05-20 19:18:44 +00:00
time_support.c