Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Ard Biesheuvel <ardb+git@google.com>
Cc: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au,
	"Ard Biesheuvel" <ardb@kernel.org>,
	"Antonio Quartulli" <antonio@mandelbit.com>,
	"Ondrej Mosnáček" <omosnacek@gmail.com>,
	dm-devel@lists.linux.dev, "Milan Broz" <gmazyland@gmail.com>
Subject: Re: [PATCH 1/2] crypto: x86 - remove aegis128 support
Date: Thu, 12 Nov 2026 20:23:29 +0000	[thread overview]
Message-ID: <20261112202329.GA815040@google.com> (raw)
In-Reply-To: <20261112164419.1769428-5-ardb+git@google.com>

On Thu, Nov 12, 2026 at 05:44:17PM +0100, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@kernel.org>
> 
> Even the people that are invested in Aegis appear to have lost interest
> in aegis128: it did win the CAESAR competition but is no longer covered
> by RFC 10032, which does list some other variants that competed as well.
> 
> So let's delete it.
> 
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

AEGIS-128 might be used by dm-crypt, e.g. if anyone passed
'-c aegis128-random' to cryptsetup.  I added dm-devel and Milan Broz to
Cc to comment on the feasibility of removing it.

But clearly AEGIS-128 is a mistake.  It has a hardcoded amount of
parallelism that is much too small for current CPUs.  That was very
clear when I looked into optimizing it with AVX-512: it just does not
work, and it uses only a quarter of the CPU's resources.

That's resulted in AES-GCM now being much faster, as well as the people
promoting AEGIS having abandoned AEGIS-128 and now advocating entirely
for other variants like AEGIS-128X4 instead (despite that unfortunately
still having a hardcoded amount of parallelism).

AEGIS-128 doesn't fare super well on the nonce front either, with it not
being nonce-misuse-resistant, and its 128-bit nonce being only an
incremental upgrade over AES-GCM's 96-bit nonce.  (Compare to
XChaCha20Poly1305's or XAES-256-GCM's 192-bit nonce, or to AES-GCM-SIV
which is nonce-misuse-resistant.)

So yes, this seems to have become yet another odd legacy thing that
doesn't really make sense to use.  If anyone does use it, it is likely
mainly because the kernel's existing, already-highly-optimized
XChaCha20Poly1305 code hasn't yet been wired up to dm-crypt, or because
they relied on outdated information about AEGIS-128's performance.

- Eric

  reply	other threads:[~2026-11-12 20:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 16:44 [PATCH 0/2] crypto: remove aegis128 support Ard Biesheuvel
2026-11-12 16:44 ` [PATCH 1/2] crypto: x86 - " Ard Biesheuvel
2026-11-12 20:23   ` Eric Biggers [this message]
2026-11-12 16:44 ` [PATCH 2/2] crypto: " Ard Biesheuvel

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=20261112202329.GA815040@google.com \
    --to=ebiggers@kernel.org \
    --cc=antonio@mandelbit.com \
    --cc=ardb+git@google.com \
    --cc=ardb@kernel.org \
    --cc=dm-devel@lists.linux.dev \
    --cc=gmazyland@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=omosnacek@gmail.com \
    /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