]> Gentwo Git Trees - linux/.git/commit
lib/crypto: tests: Add additional SHAKE tests
authorEric Biggers <ebiggers@kernel.org>
Sun, 26 Oct 2025 05:50:23 +0000 (22:50 -0700)
committerEric Biggers <ebiggers@kernel.org>
Tue, 11 Nov 2025 19:07:36 +0000 (11:07 -0800)
commitb2210f35161d6202fcca4244800a1d54c80e8bc1
treed10cd3d70c03093c64ea8e00a4a199e1450db7c5
parent15c64c47e48472875c2b85838581843f05057787
lib/crypto: tests: Add additional SHAKE tests

Add the following test cases to cover gaps in the SHAKE testing:

    - test_shake_all_lens_up_to_4096()
    - test_shake_multiple_squeezes()
    - test_shake_with_guarded_bufs()

Remove test_shake256_tiling() and test_shake256_tiling2() since they are
superseded by test_shake_multiple_squeezes().  It provides better test
coverage by using randomized testing.  E.g., it's able to generate a
zero-length squeeze followed by a nonzero-length squeeze, which the
first 7 versions of the SHA-3 patchset handled incorrectly.

Tested-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251026055032.1413733-7-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
lib/crypto/tests/sha3-testvecs.h
lib/crypto/tests/sha3_kunit.c
scripts/crypto/gen-hash-testvecs.py