mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
This commit is contained in:
@@ -356,6 +356,9 @@ elif alg == 'sha3':
|
||||
print()
|
||||
print('/* SHAKE test vectors */')
|
||||
gen_additional_sha3_testvecs()
|
||||
elif alg == 'sm3':
|
||||
gen_unkeyed_testvecs(alg)
|
||||
# Kernel doesn't implement HMAC-SM3 library functions yet.
|
||||
else:
|
||||
gen_unkeyed_testvecs(alg)
|
||||
gen_hmac_testvecs(alg)
|
||||
|
||||
Reference in New Issue
Block a user