boringssl/crypto/cipher
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
..
test Revert most of "Refactor ChaCha20-Poly1305 AEAD nonce handling." 2015-10-29 18:40:33 +00:00
aead_test.cc For now, give the unsuffixed ChaCha20 AEAD name to the old version. 2015-10-27 16:39:12 +00:00
aead.c Add EVP_AEAD_CTX_zero. 2015-08-24 23:37:58 +00:00
cipher_test.cc Re-add |EVP_des_ede|, which is ECB. 2015-08-20 21:33:21 +00:00
cipher.c Add |EVP_rc2_cbc| and implement |EVP_CTRL_SET_RC2_KEY_BITS|. 2015-08-05 21:23:56 +00:00
CMakeLists.txt Add a run_tests target to run all tests. 2015-10-26 20:33:44 +00:00
derive_key.c
e_aes.c Fix the shared builders by exporting GCM symbols. 2015-10-26 23:26:40 +00:00
e_chacha20poly1305.c Revert most of "Refactor ChaCha20-Poly1305 AEAD nonce handling." 2015-10-29 18:40:33 +00:00
e_des.c Re-add |EVP_des_ede|, which is ECB. 2015-08-20 21:33:21 +00:00
e_null.c
e_rc2.c Add |EVP_rc2_cbc| and implement |EVP_CTRL_SET_RC2_KEY_BITS|. 2015-08-05 21:23:56 +00:00
e_rc4.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
e_ssl3.c Restore the NULL-SHA ciphersuite. (Alas.) 2015-09-11 22:18:08 +00:00
e_tls.c Fix |max_tag_len| for TLS CBC AEADs. 2015-09-30 23:59:22 +00:00
internal.h
tls_cbc.c Improve crypto/digest/md32_common.h mechanism. 2015-11-03 02:04:38 +00:00