All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Laveesh Bansal <laveeshb@laveeshbansal.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] crypto: adiantum - Derive the subkeys with the ChaCha library
Date: Mon, 30 Nov 2026 19:43:03 +0000	[thread overview]
Message-ID: <20261130194303.GB16775@google.com> (raw)
In-Reply-To: <20261130055539.8278-3-laveeshb@laveeshbansal.com>

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@kernel.org>
> Signed-off-by: Laveesh Bansal <laveeshb@laveeshbansal.com>

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

- Eric

  reply	other threads:[~2026-11-30 19:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  5:55 [PATCH 0/3] crypto: adiantum - Use the ChaCha library Laveesh Bansal
2026-11-30  5:55 ` [PATCH 1/3] crypto: testmgr - Add Adiantum vectors with a partial last ChaCha block Laveesh Bansal
2026-11-30  5:55 ` [PATCH 2/3] crypto: adiantum - Derive the subkeys with the ChaCha library Laveesh Bansal
2026-11-30 19:43   ` Eric Biggers [this message]
2026-11-30  5:55 ` [PATCH 3/3] crypto: adiantum - Use the ChaCha library for the stream cipher Laveesh Bansal
2026-11-30 19:40   ` Eric Biggers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261130194303.GB16775@google.com \
    --to=ebiggers@kernel.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=laveeshb@laveeshbansal.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.