]> git.ipfire.org Git - thirdparty/linux.git/commit
lib/crypto: sha1: Add HMAC support
authorEric Biggers <ebiggers@kernel.org>
Sat, 12 Jul 2025 23:22:55 +0000 (16:22 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 14 Jul 2025 15:59:20 +0000 (08:59 -0700)
commit4cbc84471bb606ddfaf424709dd8d56b56d7ae7b
treeb357bebae640703af730fb107bd00b8c56959fd3
parent90860aef630c5c9e58d05044f2866fcbfa7aa4d9
lib/crypto: sha1: Add HMAC support

Add HMAC support to the SHA-1 library, again following what was done for
SHA-2.  Besides providing the basis for a more streamlined "hmac(sha1)"
shash, this will also be useful for multiple in-kernel users such as
net/sctp/auth.c, net/ipv6/seg6_hmac.c, and
security/keys/trusted-keys/trusted_tpm1.c.  Those are currently using
crypto_shash, but using the library functions would be much simpler.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250712232329.818226-5-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
include/crypto/sha1.h
lib/crypto/sha1.c