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

From: Eric Biggers

Date: Mon Oct 26 2026 - 21:53:18 EST


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.

- Eric