Re: [PATCH 2/3] crypto: adiantum - Derive the subkeys with the ChaCha library

From: Eric Biggers

Date: Mon Nov 30 2026 - 14:43:11 EST


On Sun, Nov 29, 2026 at 09:55:38PM -0800, Laveesh Bansal wrote:
> adiantum_setkey() derives K_E and K_H with a crypto_skcipher request
> on the stack. SYNC_SKCIPHER_REQUEST_ON_STACK() reserves much more
> stack than this needs.
>
> Derive the subkeys with the ChaCha library instead. This replaces
> the skcipher request on the stack with a much smaller ChaCha state.
> Drop the request-size checks that only guarded that request.
>
> Suggested-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> Signed-off-by: Laveesh Bansal <laveeshb@xxxxxxxxxxxxxxxxx>

This commit leaves kind of an odd intermediate state. It probably
should be merged into the next one.

- Eric