lib/crypto: tests: Add KUnit tests for SHA-224 and SHA-256
authorEric Biggers <ebiggers@kernel.org>
Wed, 9 Jul 2025 20:01:10 +0000 (13:01 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 14 Jul 2025 18:29:36 +0000 (11:29 -0700)
commit4dcf6caddaa0471c134bf0c869086fd0b57a9cc4
tree43833957a9ff400309f76d47072fae264f71f840
parent950a81224e8bda92813c5ecf851f488c94f06aba
lib/crypto: tests: Add KUnit tests for SHA-224 and SHA-256

Add KUnit test suites for the SHA-224 and SHA-256 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 suites, 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.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250709200112.258500-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
lib/crypto/Kconfig
lib/crypto/Makefile
lib/crypto/tests/Kconfig [new file with mode: 0644]
lib/crypto/tests/Makefile [new file with mode: 0644]
lib/crypto/tests/sha224-testvecs.h [new file with mode: 0644]
lib/crypto/tests/sha224_kunit.c [new file with mode: 0644]
lib/crypto/tests/sha256-testvecs.h [new file with mode: 0644]
lib/crypto/tests/sha256_kunit.c [new file with mode: 0644]