[PATCH 08/17] lib/crypto: sha3: Drop unfinished SHAKE support from gen-hash-testvecs.py
Eric Biggers
ebiggers at kernel.org
Sun Oct 19 17:50:29 PDT 2025
The SHAKE testing doesn't actually use gen-hash-testvecs.py, so remove
the unfinished SHAKE support from it.
Signed-off-by: Eric Biggers <ebiggers at kernel.org>
---
scripts/crypto/gen-hash-testvecs.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/scripts/crypto/gen-hash-testvecs.py b/scripts/crypto/gen-hash-testvecs.py
index cb6f6cfbedeb2..ba241cb1ed2fd 100755
--- a/scripts/crypto/gen-hash-testvecs.py
+++ b/scripts/crypto/gen-hash-testvecs.py
@@ -59,14 +59,10 @@ def hash_init(alg):
def hash_update(ctx, data):
ctx.update(data)
def hash_final(ctx):
- if ctx.name == "shake_128":
- return ctx.digest(16)
- if ctx.name == "shake_256":
- return ctx.digest(32)
return ctx.digest()
def compute_hash(alg, data):
ctx = hash_init(alg)
hash_update(ctx, data)
@@ -166,9 +162,9 @@ print(f'/* This file was generated by: {sys.argv[0]} {" ".join(sys.argv[1:])} */
gen_unkeyed_testvecs(alg)
if alg == 'blake2s':
gen_additional_blake2s_testvecs()
elif alg == 'poly1305':
gen_additional_poly1305_testvecs()
-elif alg.startswith('sha3-') or alg.startswith('shake'):
+elif alg.startswith('sha3-'):
pass # no HMAC
else:
gen_hmac_testvecs(alg)
--
2.51.1.dirty
More information about the linux-arm-kernel
mailing list