]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: adiantum - Convert to use NH library
authorEric Biggers <ebiggers@kernel.org>
Thu, 11 Dec 2025 01:18:38 +0000 (17:18 -0800)
committerEric Biggers <ebiggers@kernel.org>
Mon, 12 Jan 2026 19:07:50 +0000 (11:07 -0800)
commit76987479c1a66f60126afe28e3cff01f3fc0f1ae
treedae93cedc048a9d3a645af467d33f08f95520151
parenta229d83235c7627c490deb7dd4744a72567cea12
crypto: adiantum - Convert to use NH library

Reimplement the Adiantum message hashing using the nh() library
function, combined with some code which directly handles the Poly1305
stage.  The latter code is derived from crypto/nhpoly1305.c.

This eliminates the dependency on the "nhpoly1305" crypto_shash
algorithm, which existed only to fit Adiantum message hashing into the
traditional Linux crypto API paradigm.  Now that simple,
architecture-optimized library functions are a well-established option
too, we can switch to this simpler implementation.

Note: I've dropped the support for the optional third parameter of the
adiantum template, which specified the nhpoly1305 implementation.  We
could keep accepting some strings in this parameter for backwards
compatibility, but I don't think it's being used.  I believe only
"adiantum(xchacha12,aes)" and "adiantum(xchacha20,aes)" are used.

Link: https://lore.kernel.org/r/20251211011846.8179-7-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
crypto/Kconfig
crypto/adiantum.c
crypto/testmgr.c