Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Remove duplicate NID definitions | tb | 2023-04-25 | 1 | -11/+1 | |
| | ||||||
* | Remove no longer necessary compat #defines | tb | 2023-04-25 | 1 | -6/+1 | |
| | ||||||
* | Add endbr64 where needed by inspection. Passes regresson tests. | deraadt | 2023-04-25 | 2 | -0/+5 | |
| | | | | ok jsing, and kind of tb an earlier version | |||||
* | Provide EVP methods for SHA3 224/256/384/512. | jsing | 2023-04-16 | 1 | -1/+11 | |
| | | | | ok tb@ | |||||
* | Provide EVP methods for SHA512/224 and SHA512/256. | jsing | 2023-04-16 | 1 | -1/+6 | |
| | | | | ok tb@ | |||||
* | Bounds check mdlen that is passed to sha3_init(). | jsing | 2023-04-16 | 1 | -2/+5 | |
| | | | | While here, use KECCAK_BYTE_WIDTH instead of hardcoding the value. | |||||
* | Use size_t rather than int. | jsing | 2023-04-15 | 2 | -13/+13 | |
| | | | | Also buy a vowel for rsiz. | |||||
* | Add SHA3 digest length define that was previously missed. | jsing | 2023-04-15 | 1 | -1/+2 | |
| | ||||||
* | Remove sha3() function, which will not be used or exposed. | jsing | 2023-04-15 | 2 | -16/+2 | |
| | ||||||
* | Mark sha3_keccakf() as static and remove prototype from header. | jsing | 2023-04-15 | 2 | -5/+3 | |
| | ||||||
* | Use memset() to zero the context, instead of zeroing manually. | jsing | 2023-04-15 | 1 | -5/+3 | |
| | ||||||
* | Provide SHA3 length related defines. | jsing | 2023-04-15 | 1 | -1/+27 | |
| | | | | | These will make EVP integration easier, as well as being used in the SHA3 implementation itself. | |||||
* | Use the same byte order tests as we do elsewhere in libcrypto. | jsing | 2023-04-15 | 1 | -3/+5 | |
| | ||||||
* | Rename SHA3 context struct field from 'st' to 'state'. | jsing | 2023-04-15 | 2 | -15/+15 | |
| | ||||||
* | Rename SHA3 context to align with existing code. | jsing | 2023-04-15 | 2 | -14/+14 | |
| | ||||||
* | Move some defines out of the sha3_internal.h header. | jsing | 2023-04-15 | 2 | -10/+6 | |
| | ||||||
* | Revise header guards. | jsing | 2023-04-15 | 1 | -4/+4 | |
| | ||||||
* | Pull constant tables out of sha3_keccakf(). | jsing | 2023-04-15 | 1 | -24/+24 | |
| | ||||||
* | Strip and reformat comments. | jsing | 2023-04-15 | 2 | -44/+14 | |
| | | | | | Remove various comments that are unhelpful or obvious. Reformat remaining comments per style(9). | |||||
* | Apply style(9) (first pass). | jsing | 2023-04-15 | 2 | -146/+152 | |
| | ||||||
* | Import sha3_internal.h. | jsing | 2023-04-15 | 1 | -2/+2 | |
| | ||||||
* | Add license to sha3 files. | jsing | 2023-04-15 | 2 | -0/+50 | |
| | ||||||
* | Import tiny_sha3 | jsing | 2023-04-15 | 2 | -0/+238 | |
| | | | | | | This is a minimal and readable SHA3 implementation. ok tb@ | |||||
* | Add support for truncated SHA512 variants. | jsing | 2023-04-14 | 2 | -2/+115 | |
| | | | | | | | This adds support for SHA512/224 and SHA512/256, as specified in FIPS FIPS 180-4. These are truncated versions of the SHA512 hash. ok tb@ | |||||
* | Use memset() and only initialise non-zero struct members. | jsing | 2023-04-14 | 1 | -7/+7 | |
| | | | | ok tb@ | |||||
* | Remove now unused sha_local.h. | jsing | 2023-04-12 | 1 | -419/+0 | |
| | ||||||
* | Provide and use crypto_ro{l,r}_u{32,64}(). | jsing | 2023-04-12 | 1 | -14/+2 | |
| | | | | | | | | | | | | | | | Various code in libcrypto needs bitwise rotation - rather than defining different versions across the code base, provide a common set that can be reused. Any sensible compiler optimises these to a single instruction where the architecture supports it, which means we can ditch the inline assembly. On the chance that we need to provide a platform specific versions, this follows the approach used in BN where a MD crypto_arch.h header could be added in the future, which would then provide more specific versions of these functions. ok tb@ | |||||
* | Provide and use crypto_store_htobe64(). | jsing | 2023-04-12 | 1 | -23/+9 | |
| | | | | | | | | | It is common to need to store data in a specific endianness - rather than handrolling and deduplicating code to do this, provide a crypto_store_htobe64() function that converts from host endian to big endian, before storing the data to a location with unknown alignment. ok tb@ | |||||
* | Recommit jsing's r1.27 - portable is ready | tb | 2023-04-11 | 1 | -23/+4 | |
| | | | | | | Use htobe64() instead of testing BYTE_ORDER and then handrolling htobe64(). Thanks to tobhe for providing most of the fix via openiked-portable | |||||
* | Back out r1.27 using htobe64() - apparently some OS don't have it. | tb | 2023-04-11 | 1 | -4/+23 | |
| | | | | ok jsing | |||||
* | Consolidate sha1 into a single file. | jsing | 2023-04-11 | 2 | -88/+21 | |
| | ||||||
* | Simplify handling of big vs little endian. | jsing | 2023-04-11 | 1 | -40/+5 | |
| | | | | | | | Rather than sprinkling BYTE_ORDER checks throughout the implementation, always define PULL64 - on big endian platforms it just becomes a no-op. ok tb@ | |||||
* | Use htobe64() instead of testing BYTE_ORDER and then handrolling htobe64(). | jsing | 2023-04-11 | 1 | -23/+4 | |
| | | | | ok tb@ | |||||
* | Omit sha512_block_data_order() prototype when assembly is not being used. | jsing | 2023-04-11 | 1 | -4/+3 | |
| | | | | | | | | | In the case that the pure C implementation of SHA512 is being used, the prototype is unnecessary as the function is declared static and exists in dependency order. Simply omit the prototype rather than using #ifndef to toggle the static prefix. ok tb@ | |||||
* | Remove less than useful implementation notes. | jsing | 2023-04-11 | 1 | -36/+1 | |
| | | | | ok tb@ | |||||
* | More whitespace fixes. | jsing | 2023-03-29 | 1 | -51/+51 | |
| | | | | | | Another set of mechnical replacements for "a,b" with "a, b". No change in generated assembly. | |||||
* | Whitespace fixes. | jsing | 2023-03-29 | 1 | -133/+133 | |
| | | | | | | Mechanically replace "a,b" with "a, b". No change to generated assembly. | |||||
* | Whitespace fixes. | jsing | 2023-03-29 | 1 | -68/+68 | |
| | | | | | | | Mechanically replace "a,b" with "a, b", followed with some manual indentation clean up. No change in generated assembly. | |||||
* | Use multiple statements instead of a statement with multiple expressions. | jsing | 2023-03-29 | 1 | -4/+5 | |
| | | | | No change in generated assembly. | |||||
* | Mop up MD32_XARRAY from SHA1. | jsing | 2023-03-29 | 1 | -162/+135 | |
| | | | | | | | | | MD32_XARRAY (formerly SHA_XARRAY) was added as a workaround for a broken HP C compiler (circa 1999). Clean it up to simplify the code. No change in generated assembly. ok miod@ tb@ | |||||
* | Inline initial hash data values for SHA1. | jsing | 2023-03-29 | 1 | -13/+9 | |
| | | | | | | This follows what is done for other SHA implementations. ok miod@ tb@ | |||||
* | Reorder functions/code. | jsing | 2023-03-27 | 1 | -238/+238 | |
| | | | | No intended functional change. | |||||
* | Tidy includes. | jsing | 2023-03-27 | 1 | -5/+4 | |
| | ||||||
* | Replace HASH_BLOCK_DATA_ORDER with sha1_block_data_order. | jsing | 2023-03-26 | 1 | -4/+4 | |
| | | | | | The only reason to use HASH_BLOCK_DATA_ORDER in the implementation is to make the code harder to read. | |||||
* | Remove unnecessary HIDDEN_DECLS. | jsing | 2023-03-26 | 1 | -6/+1 | |
| | ||||||
* | Removes some unwanted spaces. | jsing | 2023-03-26 | 1 | -7/+7 | |
| | ||||||
* | Whack sha1dgst.c with the style(9) stick again. | jsing | 2023-03-26 | 1 | -193/+246 | |
| | ||||||
* | Tidy up includes. | jsing | 2023-03-26 | 1 | -9/+5 | |
| | ||||||
* | Inline sha_local.h in sha1dgst.c. | jsing | 2023-03-26 | 1 | -3/+360 | |
| | | | | | Nothing other than sha1dst.c uses this header - pull it in to sha1dgst.c directly (sha_local.h will be removed at a later date). | |||||
* | Add license to sha256.c/sha512.c. | jsing | 2023-03-26 | 2 | -6/+100 | |
| |