]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lib/crypto: tests: Add KUnit tests for SM3
authorEric Biggers <ebiggers@kernel.org>
Sat, 21 Mar 2026 04:09:28 +0000 (21:09 -0700)
committerEric Biggers <ebiggers@kernel.org>
Tue, 24 Mar 2026 00:50:59 +0000 (17:50 -0700)
commitd6781b8ba33ae9f6ab2e88c1158e989a24847c4b
treed3ada517da0d81edac9760e1aaadc7749740da23
parent324bb3bb75ac21adbbc7e6ea5cdb0a735fb78a56
lib/crypto: tests: Add KUnit tests for SM3

Add a KUnit test suite for the SM3 library.  It closely mirrors the test
suites for the other cryptographic hash functions.  The actual test and
benchmark logic is already in hash-test-template.h; this just wires it
up for SM3 in the usual way.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20260321040935.410034-6-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
lib/crypto/.kunitconfig
lib/crypto/tests/Kconfig
lib/crypto/tests/Makefile
lib/crypto/tests/sm3-testvecs.h [new file with mode: 0644]
lib/crypto/tests/sm3_kunit.c [new file with mode: 0644]
scripts/crypto/gen-hash-testvecs.py