Re: [PATCH] lib/crypto: Add SHA3-224, SHA3-256, SHA3-384, SHA-512, SHAKE128, SHAKE256

From: David Howells

Date: Fri Sep 19 2025 - 11:34:48 EST


Simo Sorce <simo@xxxxxxxxxx> wrote:

> I strongly suggest creating a test vector where multiple absorb and
> squeeze operations are done in intermixed order, and then use that test
> vector in your Kunit tests to ensure changes to the code do not break
> this fundamental property of the keccak sponge algorithm.

I'm putting such a beast in the module init function at least.

Annoyingly, Eric's hash-test-template.h makes some unwarranted assumptions
about the hashes it is testing - such as the final function zeroing out the
hash struct.

David