lib/crypto: tests: Add KUnit tests for SHA-1 and HMAC-SHA1
authorEric Biggers <ebiggers@kernel.org>
Sat, 12 Jul 2025 23:23:06 +0000 (16:23 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 14 Jul 2025 18:29:36 +0000 (11:29 -0700)
commit66b130607908417a126de7fdc55f0c671ac365e6
treed1e1fc9abb03928697e2c4e54a73b38941ac7535
parent6dd4d9f7919e73bc7ad247eca82e8be1c123af0a
lib/crypto: tests: Add KUnit tests for SHA-1 and HMAC-SHA1

Add a KUnit test suite for the SHA-1 library functions, including the
corresponding HMAC support.  The core test logic is in the
previously-added hash-test-template.h.  This commit just adds the actual
KUnit suite, and it adds the generated test vectors to the tree so that
gen-hash-testvecs.py won't have to be run at build time.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250712232329.818226-16-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
lib/crypto/tests/Kconfig
lib/crypto/tests/Makefile
lib/crypto/tests/sha1-testvecs.h [new file with mode: 0644]
lib/crypto/tests/sha1_kunit.c [new file with mode: 0644]