mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
crypto: sha1 - Wrap library and add HMAC support
Like I did for crypto/sha512.c, rework crypto/sha1_generic.c (renamed to crypto/sha1.c) to simply wrap the normal library functions instead of accessing the low-level block function directly. Also add support for HMAC-SHA1, again just wrapping the library functions. Since the replacement crypto_shash algorithms are implemented using the (potentially arch-optimized) library functions, give them driver names ending with "-lib" rather than "-generic". Update crypto/testmgr.c and an odd driver to take this change in driver name into account. Note: to see the diff from crypto/sha1_generic.c to crypto/sha1.c, view this commit with 'git show -M10'. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20250712232329.818226-6-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
This commit is contained in:
@@ -986,7 +986,8 @@ config CRYPTO_SHA1
|
||||
select CRYPTO_HASH
|
||||
select CRYPTO_LIB_SHA1
|
||||
help
|
||||
SHA-1 secure hash algorithm (FIPS 180, ISO/IEC 10118-3)
|
||||
SHA-1 secure hash algorithm (FIPS 180, ISO/IEC 10118-3), including
|
||||
HMAC support.
|
||||
|
||||
config CRYPTO_SHA256
|
||||
tristate "SHA-224 and SHA-256"
|
||||
|
||||
Reference in New Issue
Block a user