From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: Ard Biesheuvel <ardb@kernel.org>,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Martin Willi <martin@strongswan.org>,
Antonio Quartulli <antonio@mandelbit.com>
Subject: Re: [PATCH] lib/crypto: x86/chacha: Use bzhi to simplify mask generation
Date: Sat, 7 Nov 2026 13:39:49 -0800 [thread overview]
Message-ID: <20261107213949.GD137269@quark> (raw)
In-Reply-To: <20261103235027.63382-1-ebiggers@kernel.org>
On Tue, Nov 03, 2026 at 03:50:27PM -0800, Eric Biggers wrote:
> When XOR'ing the bytes from a partial register at the end, use the bzhi
> instruction (from BMI2) to generate the needed mask a bit more
> efficiently. All real processors with AVX-512 also have BMI2, so we
> might as well make use of it. This follows the example of the AVX-512
> optimized AES-GCM code which already does this.
>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
> lib/crypto/x86/chacha-avx512-x86_64.S | 30 +++++++++++----------------
> lib/crypto/x86/chacha.h | 3 ++-
> 2 files changed, 14 insertions(+), 19 deletions(-)
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-next
- Eric
prev parent reply other threads:[~2026-11-07 21:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 23:50 [PATCH] lib/crypto: x86/chacha: Use bzhi to simplify mask generation Eric Biggers
2026-11-04 0:02 ` Antonio Quartulli
2026-11-07 21:39 ` Eric Biggers [this message]
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=20261107213949.GD137269@quark \
--to=ebiggers@kernel.org \
--cc=Jason@zx2c4.com \
--cc=antonio@mandelbit.com \
--cc=ardb@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=martin@strongswan.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox