Up to [local] / src / lib / libcrypto
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.10 / (download) - annotate - [select for diffs], Wed Apr 17 14:43:37 2024 UTC (7 weeks, 5 days ago) by jsing
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +68 -1 lines
Diff to previous 1.9 (colored)
Provide constant time operations for uint8_t. These will be used in upcoming changes. ok tb@
Revision 1.9 / (download) - annotate - [select for diffs], Thu Mar 28 08:36:13 2024 UTC (2 months, 2 weeks ago) by jsing
Branch: MAIN
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)
Include stdint.h since we use uint*_t types.
Revision 1.8 / (download) - annotate - [select for diffs], Tue Mar 26 04:11:42 2024 UTC (2 months, 2 weeks ago) by jsing
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)
Fix function guards.
Revision 1.7 / (download) - annotate - [select for diffs], Tue Aug 15 08:39:27 2023 UTC (9 months, 3 weeks ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5,
OPENBSD_7_4_BASE,
OPENBSD_7_4
Changes since 1.6: +32 -1 lines
Diff to previous 1.6 (colored)
Clean up alignment handling. Instead of using HOST_{c2l,l2c} macros, provide and use crypto_load_le32toh() and crypto_store_htole32(). In some cases just use htole32() directly. ok tb@
Revision 1.6 / (download) - annotate - [select for diffs], Sat May 27 09:18:17 2023 UTC (12 months, 2 weeks ago) by jsing
Branch: MAIN
Changes since 1.5: +44 -7 lines
Diff to previous 1.5 (colored)
Clean up alignment handling for SHA-512. This recommits r1.37 of sha512.c, however uses uint8_t * instead of void * for the crypto_load_* functions and primarily uses const uint8_t * to track input, only casting to const SHA_LONG64 * once we know that it is suitably aligned. This prevents the compiler from implying alignment based on type. Tested by tb@ and deraadt@ on platforms with gcc and strict alignment. ok tb@
Revision 1.5 / (download) - annotate - [select for diffs], Fri May 19 00:54:27 2023 UTC (12 months, 3 weeks ago) by deraadt
Branch: MAIN
Changes since 1.4: +8 -45 lines
Diff to previous 1.4 (colored)
backout alignment changes (breaking at least two architectures)
Revision 1.4 / (download) - annotate - [select for diffs], Wed May 17 06:37:14 2023 UTC (12 months, 3 weeks ago) by jsing
Branch: MAIN
Changes since 1.3: +46 -9 lines
Diff to previous 1.3 (colored)
Clean up alignment handling for SHA-512. All assembly implementations are required to perform their own alignment handling. In the case of the C implementation, on strict alignment platforms, unaligned data will be copied into an aligned buffer. However, most platforms then perform byte-by-byte reads (via the PULL64 macros). Instead, remove SHA512_BLOCK_CAN_MANAGE_UNALIGNED_DATA and alignment handling to sha512_block_data_order() - if the data is aligned then simply perform 64 bit loads and then do endian conversion via be64toh(). If the data is unaligned then use memcpy() and be64toh() (in the form of crypto_load_be64toh()). Overall this reduces complexity and can improve performance (on aarch64 we get a ~10% performance gain with aligned input and about ~1-2% gain on armv7), while the same movq/bswapq is generated for amd64 and movl/bswapl for i386. ok tb@
Revision 1.3 / (download) - annotate - [select for diffs], Fri Apr 14 10:42:51 2023 UTC (13 months, 4 weeks ago) by jsing
Branch: MAIN
Changes since 1.2: +20 -1 lines
Diff to previous 1.2 (colored)
Provide soon to be used crypto_store_htobe32(). ok tb@
Revision 1.2 / (download) - annotate - [select for diffs], Wed Apr 12 04:54:15 2023 UTC (14 months ago) by jsing
Branch: MAIN
Changes since 1.1: +32 -0 lines
Diff to previous 1.1 (colored)
Provide and use crypto_ro{l,r}_u{32,64}(). 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@
Revision 1.1 / (download) - annotate - [select for diffs], Wed Apr 12 04:40:39 2023 UTC (14 months ago) by jsing
Branch: MAIN
Provide and use crypto_store_htobe64(). 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@