The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Thomas Huth <thuth@redhat.com>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ard Biesheuvel <ardb@kernel.org>,
	"Jason A . Donenfeld" <Jason@zx2c4.com>,
	Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH v2 06/13] lib/crypto: aes: Add GCM support
Date: Wed, 22 Jul 2026 15:06:29 +0000	[thread overview]
Message-ID: <20260722150629.GA2794619@google.com> (raw)
In-Reply-To: <ccaed4f3-a631-4d67-92ac-de9f1937e65c@redhat.com>

On Wed, Jul 22, 2026 at 01:02:46PM +0200, Thomas Huth wrote:
> > Initial test coverage is provided by the crypto_aead support added in a
> > later commit.  I'm planning a KUnit test suite as well.
> Sorry for asking ignorant questions, but which later commit is this? I
> couldn't spot it :-/

It's "crypto: aes - Add GCM support using library".  That adds a
"gcm(aes)" crypto_aead algorithm that is implemented on top of these new
AES-GCM library functions.  That makes it be tested by the self-tests in
crypto/testmgr.c when CONFIG_CRYPTO_SELFTESTS_FULL=y.

The KUnit test suite I haven't sent out, but I'm going to try to get out
in the next week or two.  I've just had a lot going on.

> Anyway, the previous AES-GCM code in lib/crypto/aesgcm.c featured some
> self-tests in libaesgcm_init() ... would it maybe make sense to add those
> here, too?

The crypto library uses KUnit tests, instead of ad-hoc tests run in the
initcalls (except for the minimal tests required by FIPS 140-3).  See
https://docs.kernel.org/crypto/libcrypto.html#testing

We could migrate the old libaesgcm_init() tests directly into a KUnit
test suite.  But I'd like to write something more complete that tests
the incremental API and various other aspects of the API too.

- Eric

  reply	other threads:[~2026-07-22 15:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 22:11 [PATCH v2 00/13] Library APIs for AES encryption modes Eric Biggers
2026-07-15 22:11 ` [PATCH v2 01/13] crypto: xts - Split out __xts_verify_key() helper Eric Biggers
2026-07-15 22:11 ` [PATCH v2 02/13] lib/crypto: aes: Add ECB support Eric Biggers
2026-07-15 22:11 ` [PATCH v2 03/13] lib/crypto: aes: Add CBC and CBC-CTS support Eric Biggers
2026-07-15 22:11 ` [PATCH v2 04/13] lib/crypto: aes: Add CTR and XCTR support Eric Biggers
2026-07-16  7:40   ` Thomas Huth
2026-07-15 22:11 ` [PATCH v2 05/13] lib/crypto: aes: Add XTS support Eric Biggers
2026-07-15 22:11 ` [PATCH v2 06/13] lib/crypto: aes: Add GCM support Eric Biggers
2026-07-22 11:02   ` Thomas Huth
2026-07-22 15:06     ` Eric Biggers [this message]
2026-07-15 22:11 ` [PATCH v2 07/13] lib/crypto: aes: Add CCM support Eric Biggers
2026-07-15 22:11 ` [PATCH v2 08/13] crypto: aes - Add ECB support using library Eric Biggers
2026-07-15 22:11 ` [PATCH v2 09/13] crypto: aes - Add CBC and CBC-CTS " Eric Biggers
2026-07-15 22:11 ` [PATCH v2 10/13] crypto: aes - Add CTR and XCTR " Eric Biggers
2026-07-15 22:11 ` [PATCH v2 11/13] crypto: aes - Add XTS " Eric Biggers
2026-07-15 22:11 ` [PATCH v2 12/13] crypto: aes - Add GCM " Eric Biggers
2026-07-15 22:11 ` [PATCH v2 13/13] crypto: aes - Add CCM " Eric Biggers
2026-07-20 18:01 ` [PATCH v2 00/13] Library APIs for AES encryption modes 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=20260722150629.GA2794619@google.com \
    --to=ebiggers@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=ardb@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thuth@redhat.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