Re: [PATCH 1/2] lib/crypto: tests: Add KUnit tests and benchmark for ChaCha

From: Eric Biggers

Date: Tue Nov 03 2026 - 18:29:03 EST


On Mon, Oct 26, 2026 at 06:53:13PM -0700, Eric Biggers wrote:
> On Mon, Oct 26, 2026 at 12:47:54AM +0100, Antonio Quartulli wrote:
> > + for (size_t i = 0; i < 10000000; i += max_len)
> > + chacha_crypt(&st, data, data, max_len, 20);
>
> The calls to chacha_crypt() with constant 20 argument should be
> chacha20_crypt(). Mainly so that if people copy-and-paste this outside
> of test code, they use the right one.
>
> Otherwise this test looks fine. I'll apply it once the merge window
> closes.

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-next

I replaced the instances of chacha_crypt(..., 20) with chacha20_crypt().

- Eric