diff options
| author | Eric Biggers <ebiggers@kernel.org> | 2026-03-20 21:09:28 -0700 |
|---|---|---|
| committer | Eric Biggers <ebiggers@kernel.org> | 2026-03-23 17:50:59 -0700 |
| commit | d6781b8ba33ae9f6ab2e88c1158e989a24847c4b (patch) | |
| tree | d3ada517da0d81edac9760e1aaadc7749740da23 /scripts | |
| parent | 324bb3bb75ac21adbbc7e6ea5cdb0a735fb78a56 (diff) | |
| download | lwn-d6781b8ba33ae9f6ab2e88c1158e989a24847c4b.tar.gz lwn-d6781b8ba33ae9f6ab2e88c1158e989a24847c4b.zip | |
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>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/crypto/gen-hash-testvecs.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/crypto/gen-hash-testvecs.py b/scripts/crypto/gen-hash-testvecs.py index e69ce213fb33..f356f87e1c77 100755 --- a/scripts/crypto/gen-hash-testvecs.py +++ b/scripts/crypto/gen-hash-testvecs.py @@ -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) |
