summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/sha/sha1.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Replace Makefile based SHA*_ASM defines with HAVE_SHA_* defines.jsing2025-02-141-6/+13
| | | | | | | | | | | | | | | | Currently, SHA{1,256,512}_ASM defines are used to remove the C implementation of sha{1,256,512}_block_data_order() when it is provided by assembly. However, this prevents the C implementation from being used as a fallback. Rename the C sha*_block_data_order() to sha*_block_generic() and provide a sha*_block_data_order() that calls sha*_block_generic(). Replace the Makefile based SHA*_ASM defines with two HAVE_SHA_* defines that allow these functions to be compiled in or removed, such that machine specific verisons can be provided. This should effectively be a no-op on any platform that defined SHA{1,256,512}_ASM. ok tb@
* Remove support for static buffers in HMAC/digeststb2024-06-011-5/+1
| | | | | | | | | | | | | | | | | | HMAC() and the one-step digests used to support passing a NULL buffer and would return the digest in a static buffer. This design is firmly from the nineties, not thread safe and it saves callers a single line. The few ports that used to rely this were fixed with patches sent to non-hostile (and non-dead) upstreams. It's early enough in the release cycle that remaining uses hidden from the compiler should be caught, at least the ones that matter. There won't be that many since BoringSSL removed this feature in 2017. https://boringssl-review.googlesource.com/14528 Add non-null attributes to the headers and add a few missing bounded attributes. ok beck jsing
* Demacro sha1.jsing2024-03-281-164/+252
| | | | | | | | | Replace macros with static inline functions and use names that follow the spec more closely. Unlike SHA256/SHA512, the functions and constants do not align with the number of words loaded, which means we cannot easily loop and just end up just unrolling everything. ok joshua@ tb@
* Rework input and output handling for sha1.jsing2024-03-261-128/+79
| | | | | | | | Use be32toh(), htobe32() and crypto_{load,store}_htobe32() as appropriate. Also use the same while() loop that is used for other hash functions. ok joshua@ tb@
* Remove MD32_REG_T.jsing2023-08-101-3/+3
| | | | | | | | | This is a hack that is only enabled on a handful of 64 bit platforms, as a workaround for poor compiler optimisation. If you're running an archiac compiler on an archiac architecture, then you can deal with slightly lower performance. ok tb@
* Hide symbols in shabeck2023-07-081-1/+6
| | | | ok tb@
* Remove unused SHA-1 implementation.jsing2023-07-081-86/+1
|
* Remove now unnecessary "do { } while (0)"jsing2023-07-081-4/+2
|
* Inline HASH_MAKE_STRING macro.jsing2023-07-081-15/+14
| | | | No change to generated assembly.
* Reorder functions.jsing2023-07-081-113/+113
| | | | No functional change.
* Implement SHA1_{Update,Transform,Final}() directly in sha1.c.jsing2023-07-071-5/+104
| | | | | | | | Copy the update, transform and final functions from md32_common.h, manually expanding the macros for SHA1. This will allow for further clean up to occur. No change in generated assembly.
* Consolidate sha1 into a single file.jsing2023-04-111-0/+460
|
* Remove meat which either duplicates code found in apps/, or is only of valuemiod2014-04-221-125/+0
| | | | for 20th century historians, and can be put in the Attic.
* Unsurprisingly, since <unistd.h> was so darn hard to find for OpenSSL developersbeck2014-04-181-3/+1
| | | | | | | | they had resorted to manually protyping read(2) instead of incredible amount of preprocessor wizardry needed to find the ever illusive <unistd.h>. Let's just include <unistd.h> and we don't need to do this.. While we're at it flense out _OSD_POSIX and __DGJPP__ cruft. ok krw@
* OpenSSL 0.9.4 mergebeck1999-09-291-13/+5
|
* Import of SSLeay-0.9.0b with RSA and IDEA stubbed + OpenBSD buildryker1998-10-051-0/+135
functionality for shared libs. Note that routines such as sslv2_init and friends that use RSA will not work due to lack of RSA in this library. Needs documentation and help from ports for easy upgrade to full functionality where legally possible.