From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
sparclinux@vger.kernel.org, Eric Biggers <ebiggers@kernel.org>
Subject: [PATCH 0/7] MD5 library functions
Date: Sun, 3 Aug 2025 13:44:26 -0700 [thread overview]
Message-ID: <20250803204433.75703-1-ebiggers@kernel.org> (raw)
This series is targeting libcrypto-next and can also be retrieved from:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git md5-lib-v1
Patches 1-4 remove the MD5 implementations for mips, powerpc, and sparc.
These were the only architecture-optimized MD5 implementations and are
not worth keeping around.
Patches 5-7 introduce a library API for MD5 and HMAC-MD5 and reimplement
the crypto_shash "md5" and "hmac(md5)" on top of it.
The library API will also be usable directly by various in-kernel users
that are stuck with MD5 due to having to implement legacy protocols.
This should again look quite boring and familiar, as it mirrors the
SHA-1 and SHA-2 changes closely. The MD5 changes are quite a bit
simpler, though, since we'll only be supporting the generic C MD5 code.
Of course there's also only one variant of MD5, unlike e.g. SHA-2.
Eric Biggers (7):
mips: cavium-octeon: Remove Octeon optimized MD5 code
mips: cavium-octeon: Move octeon-crypto.c into parent dir
crypto: powerpc/md5 - Remove PowerPC optimized MD5 code
crypto: sparc/md5 - Remove SPARC64 optimized MD5 code
lib/crypto: md5: Add MD5 and HMAC-MD5 library functions
crypto: md5 - Wrap library and add HMAC support
lib/crypto: tests: Add KUnit tests for MD5 and HMAC-MD5
arch/mips/cavium-octeon/Makefile | 2 +-
arch/mips/cavium-octeon/crypto/Makefile | 8 -
arch/mips/cavium-octeon/crypto/octeon-md5.c | 214 -----------
.../{crypto => }/octeon-crypto.c | 0
arch/mips/configs/cavium_octeon_defconfig | 1 -
arch/mips/crypto/Kconfig | 10 -
arch/mips/include/asm/octeon/crypto.h | 21 +-
arch/powerpc/configs/powernv_defconfig | 1 -
arch/powerpc/configs/ppc64_defconfig | 1 -
arch/powerpc/crypto/Kconfig | 8 -
arch/powerpc/crypto/Makefile | 2 -
arch/powerpc/crypto/md5-asm.S | 235 ------------
arch/powerpc/crypto/md5-glue.c | 99 -----
arch/sparc/crypto/Kconfig | 10 -
arch/sparc/crypto/Makefile | 4 -
arch/sparc/crypto/md5_asm.S | 70 ----
arch/sparc/crypto/md5_glue.c | 174 ---------
crypto/Kconfig | 2 +-
crypto/md5.c | 359 ++++++++----------
crypto/testmgr.c | 3 +
drivers/crypto/img-hash.c | 2 +-
include/crypto/md5.h | 181 ++++++++-
lib/crypto/Kconfig | 6 +
lib/crypto/Makefile | 3 +
lib/crypto/md5.c | 290 ++++++++++++++
lib/crypto/tests/Kconfig | 10 +
lib/crypto/tests/Makefile | 1 +
lib/crypto/tests/md5-testvecs.h | 186 +++++++++
lib/crypto/tests/md5_kunit.c | 39 ++
29 files changed, 891 insertions(+), 1051 deletions(-)
delete mode 100644 arch/mips/cavium-octeon/crypto/Makefile
delete mode 100644 arch/mips/cavium-octeon/crypto/octeon-md5.c
rename arch/mips/cavium-octeon/{crypto => }/octeon-crypto.c (100%)
delete mode 100644 arch/powerpc/crypto/md5-asm.S
delete mode 100644 arch/powerpc/crypto/md5-glue.c
delete mode 100644 arch/sparc/crypto/md5_asm.S
delete mode 100644 arch/sparc/crypto/md5_glue.c
create mode 100644 lib/crypto/md5.c
create mode 100644 lib/crypto/tests/md5-testvecs.h
create mode 100644 lib/crypto/tests/md5_kunit.c
base-commit: 186f3edfdd41f2ae87fc40a9ccba52a3bf930994
--
2.50.1
next reply other threads:[~2025-08-03 20:45 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-03 20:44 Eric Biggers [this message]
2025-08-03 20:44 ` [PATCH 1/7] mips: cavium-octeon: Remove Octeon optimized MD5 code Eric Biggers
2025-08-03 20:44 ` [PATCH 2/7] mips: cavium-octeon: Move octeon-crypto.c into parent dir Eric Biggers
2025-08-03 20:44 ` [PATCH 3/7] crypto: powerpc/md5 - Remove PowerPC optimized MD5 code Eric Biggers
2025-08-03 22:07 ` Segher Boessenkool
2025-08-03 22:14 ` Eric Biggers
2025-08-03 22:27 ` Segher Boessenkool
2025-08-03 22:56 ` Eric Biggers
2025-08-04 17:42 ` Christophe Leroy
2025-08-04 18:09 ` Eric Biggers
2025-08-04 19:02 ` Christophe Leroy
2025-08-04 22:59 ` Eric Biggers
2025-08-04 23:09 ` Eric Biggers
2025-08-05 6:21 ` Christophe Leroy
2025-08-05 4:49 ` Crypto use cases (was: Remove PowerPC optimized MD5 code) Simon Richter
2025-08-05 4:58 ` Eric Biggers
2025-08-05 7:17 ` Crypto use cases Simon Richter
2025-08-05 17:15 ` Eric Biggers
2025-08-05 6:27 ` [PATCH 3/7] crypto: powerpc/md5 - Remove PowerPC optimized MD5 code Christophe Leroy
2025-08-05 16:16 ` Eric Biggers
2025-08-03 20:44 ` [PATCH 4/7] crypto: sparc/md5 - Remove SPARC64 " Eric Biggers
2025-08-04 4:44 ` Simon Richter
2025-08-04 6:07 ` Eric Biggers
2025-08-03 20:44 ` [PATCH 5/7] lib/crypto: md5: Add MD5 and HMAC-MD5 library functions Eric Biggers
2025-08-03 20:44 ` [PATCH 6/7] crypto: md5 - Wrap library and add HMAC support Eric Biggers
2025-08-03 20:44 ` [PATCH 7/7] lib/crypto: tests: Add KUnit tests for MD5 and HMAC-MD5 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=20250803204433.75703-1-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sparclinux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.