On Tue, Aug 05, 2025 at 03:28:54PM -0700, Eric Biggers wrote:
quoted hunk ↗ jump to hunk
Reimplement crypto/md5.c on top of the new MD5 library functions. Also
add support for HMAC-MD5, again just wrapping the library functions.
This closely mirrors crypto/sha1.c.
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
crypto/Kconfig | 2 +-
crypto/md5.c | 359 ++++++++++++++++++--------------------
crypto/testmgr.c | 3 +
drivers/crypto/img-hash.c | 2 +-
4 files changed, 171 insertions(+), 195 deletions(-)
diff --git a/crypto/Kconfig b/crypto/Kconfig
index 23bd98981ae8e..331c4fbb158b2 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -937,11 +937,11 @@ config CRYPTO_MD4
config CRYPTO_MD5
tristate "MD5"
select CRYPTO_HASH
help
- MD5 message digest algorithm (RFC1321)
+ MD5 message digest algorithm (RFC1321), including HMAC support.
Correction: there needs to be 'select CRYPTO_LIB_MD5' above.
- Eric