Re: [PATCH v2 06/13] lib/crypto: aes: Add GCM support
Eric Biggers <[email protected]> Wed, 22 Jul 2026 15:06:29 +0000
| Newsgroups | org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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