Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-09Add one-shot |MD4| function.Adam Langley
This could live in decrepit, but it's tiny and having it makes the interface more uniform that what we have for MD5 so I put it in the main code. This is to more easily support nmap. Change-Id: Ia098cc7ef6e00a90d2f3f56ee7deba8329c9a82e Reviewed-on: https://boringssl-review.googlesource.com/7400 Reviewed-by: David Benjamin <davidben@google.com>
2015-12-16Store the partial block as uint8_t, not uint32_t.David Benjamin
The uint32_t likely dates to them using HASH_LONG everywhere. Nothing ever touches c->data as a uint32_t, only bytes. (Which makes sense seeing as it stores the partial block.) Change-Id: I634cb7f2b6306523aa663f8697b7dc92aa491320 Reviewed-on: https://boringssl-review.googlesource.com/6651 Reviewed-by: Adam Langley <agl@google.com>
2015-12-16Reformat md32_common.h, part 2.David Benjamin
Manual tweaks and then clang-formatted again. Change-Id: I809fdb71b2135343e5c1264dd659b464780fc54a Reviewed-on: https://boringssl-review.googlesource.com/6649 Reviewed-by: Adam Langley <agl@google.com>
2015-11-04Improve crypto/digest/md32_common.h mechanism.Brian Smith
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 took 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: I6e9dd09ff057c67941021d324a4fa1d39f58b0db Reviewed-on: https://boringssl-review.googlesource.com/6405 Reviewed-by: Adam Langley <agl@google.com>
2015-11-03Revert "Improve crypto/digest/md32_common.h mechanism."Adam Langley
This reverts commit 00461cf201b66205653fd6159ae260f453738641. Sadly it broke wpa_supplicant.
2015-11-03Improve crypto/digest/md32_common.h mechanism.Brian Smith
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-07-29Fix some typos in license headers.David Benjamin
These are not in upstream and were probably introduced on accident by stray vim keystrokes. Change-Id: I35f51f81fc37e75702e7d8ffc6f040ce71321b54 Reviewed-on: https://boringssl-review.googlesource.com/5490 Reviewed-by: Adam Langley <agl@google.com>
2015-06-11Correct various documentation typosKenny Root
Some of the documentation had the right explanation but the incorrect function names attached. Change-Id: I7b479dae6d71a5ac7bc86df5a3890508c3b3d09f Reviewed-on: https://boringssl-review.googlesource.com/5090 Reviewed-by: Adam Langley <agl@google.com>
2014-11-06Add digest_test with tests for all existing EVP_MDs.David Benjamin
Remove the existing md5_test and sha1_test. They now are all covered by digest_test. For good measure, test the one-shot functions too. Change-Id: I8e144cc563fb8817144e26cbd2e10c15642464ba Reviewed-on: https://boringssl-review.googlesource.com/2211 Reviewed-by: Adam Langley <agl@google.com>
2014-08-27Fix build (broken by MD4_CTX redefine).Piotr Sikora
Change-Id: I0ce6f88ac2734e0267de5fed2cdd35bc20c9a8b5 Signed-off-by: Piotr Sikora <piotr@cloudflare.com> Reviewed-on: https://boringssl-review.googlesource.com/1650 Reviewed-by: Adam Langley <agl@google.com>
2014-08-27Readd MD4.Adam Langley
Sadly this is needed by wpa_supplicant for NTLM hashes. Change-Id: I1c362c676a11ee01f301ff6fbd33d0669396ea23 Reviewed-on: https://boringssl-review.googlesource.com/1620 Reviewed-by: Adam Langley <agl@google.com>