From 5f2f30a42713c09c044e2c44e73efbb410607666 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 31 Aug 2024 10:38:49 +0000 Subject: Nuke the whrlpool (named after the galaxy) from orbit It's just gross. Only used by a popular disk encryption utility on an all-too-popular OS one or two decades back. ok beck jsing --- src/lib/libcrypto/evp/evp.h | 5 +--- src/lib/libcrypto/evp/evp_names.c | 7 +---- src/lib/libcrypto/evp/m_wp.c | 54 --------------------------------------- 3 files changed, 2 insertions(+), 64 deletions(-) delete mode 100644 src/lib/libcrypto/evp/m_wp.c (limited to 'src/lib/libcrypto/evp') diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index 7c767758da..c2b81d0576 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: evp.h,v 1.136 2024/08/31 09:14:21 tb Exp $ */ +/* $OpenBSD: evp.h,v 1.137 2024/08/31 10:38:49 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -595,9 +595,6 @@ const EVP_MD *EVP_sm3(void); #ifndef OPENSSL_NO_RIPEMD const EVP_MD *EVP_ripemd160(void); #endif -#ifndef OPENSSL_NO_WHIRLPOOL -const EVP_MD *EVP_whirlpool(void); -#endif const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */ #ifndef OPENSSL_NO_DES const EVP_CIPHER *EVP_des_ecb(void); diff --git a/src/lib/libcrypto/evp/evp_names.c b/src/lib/libcrypto/evp/evp_names.c index af3fd17c12..817d33602c 100644 --- a/src/lib/libcrypto/evp/evp_names.c +++ b/src/lib/libcrypto/evp/evp_names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_names.c,v 1.17 2024/07/29 06:05:31 tb Exp $ */ +/* $OpenBSD: evp_names.c,v 1.18 2024/08/31 10:38:49 tb Exp $ */ /* * Copyright (c) 2023 Theo Buehler * @@ -1464,11 +1464,6 @@ static const struct digest_name digest_names[] = { .digest = EVP_sha1, .alias = SN_sha1, }, - - { - .name = SN_whirlpool, - .digest = EVP_whirlpool, - }, }; #define N_DIGEST_NAMES (sizeof(digest_names) / sizeof(digest_names[0])) diff --git a/src/lib/libcrypto/evp/m_wp.c b/src/lib/libcrypto/evp/m_wp.c deleted file mode 100644 index 6755d56e44..0000000000 --- a/src/lib/libcrypto/evp/m_wp.c +++ /dev/null @@ -1,54 +0,0 @@ -/* $OpenBSD: m_wp.c,v 1.14 2024/04/09 13:52:41 beck Exp $ */ - -#include - -#include - -#ifndef OPENSSL_NO_WHIRLPOOL - -#include -#include -#include -#include - -#include "evp_local.h" - -static int -init(EVP_MD_CTX *ctx) -{ - return WHIRLPOOL_Init(ctx->md_data); -} - -static int -update(EVP_MD_CTX *ctx, const void *data, size_t count) -{ - return WHIRLPOOL_Update(ctx->md_data, data, count); -} - -static int -final(EVP_MD_CTX *ctx, unsigned char *md) -{ - return WHIRLPOOL_Final(md, ctx->md_data); -} - -static const EVP_MD whirlpool_md = { - .type = NID_whirlpool, - .pkey_type = 0, - .md_size = WHIRLPOOL_DIGEST_LENGTH, - .flags = 0, - .init = init, - .update = update, - .final = final, - .copy = NULL, - .cleanup = NULL, - .block_size = WHIRLPOOL_BBLOCK / 8, - .ctx_size = sizeof(EVP_MD *) + sizeof(WHIRLPOOL_CTX), -}; - -const EVP_MD * -EVP_whirlpool(void) -{ - return (&whirlpool_md); -} -LCRYPTO_ALIAS(EVP_whirlpool); -#endif -- cgit v1.2.3-55-g6feb