]> git.ipfire.org Git - thirdparty/linux.git/commit
lib/crypto: powerpc/md5: Drop powerpc optimized MD5 code
authorEric Biggers <ebiggers@kernel.org>
Wed, 6 May 2026 03:00:05 +0000 (20:00 -0700)
committerEric Biggers <ebiggers@kernel.org>
Sat, 9 May 2026 18:41:01 +0000 (11:41 -0700)
commitcf52058dcdd96420cfc38ee284c5ac077901ea61
tree9a1e0434fd43af63be97b41480866d3505b9508b
parent7fd2df204f342fc17d1a0bfcd474b24232fb0f32
lib/crypto: powerpc/md5: Drop powerpc optimized MD5 code

MD5 is obsolete, is vulnerable to collision attacks, and is being
replaced by SHA-256 in new systems.  It doesn't make sense to continue
to maintain architecture-optimized implementations of MD5.  Effort
should be spent on modern algorithms.

Indeed, architecture-optimized MD5 code remains only for powerpc.  It
was already removed from mips and sparc, and it never existed for any
other architecture (e.g. x86, arm, or arm64) in the first place.
Earlier the decision was made to keep the powerpc MD5 code for a while
anyway because of someone using it via AF_ALG via libkcapi-hasher
(https://lore.kernel.org/r/f0d771d5-ed70-444c-957a-ad4c16f6c115@csgroup.eu/)

However, with AF_ALG itself now being on its way out due to its
continuous stream of security vulnerabilities
(https://lore.kernel.org/r/20260430011544.31823-1-ebiggers@kernel.org/),
it's also time to be a bit more forceful with nudging people towards
userspace crypto code.  It's always been the better solution anyway, and
it's much more efficient if properly optimized code is used.

Note that the md5-asm.S file contains no privileged instructions and
could be run in userspace just fine.

Thus, we now have two factors going against keeping the powerpc MD5
code.  Different people might weigh these two factors differently, but I
think the two of them together make the removal the clear choice.

Let's remove it.

Acked-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://patch.msgid.link/20260506030005.9698-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
lib/crypto/Kconfig
lib/crypto/Makefile
lib/crypto/md5.c
lib/crypto/powerpc/md5-asm.S [deleted file]
lib/crypto/powerpc/md5.h [deleted file]