]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Delete md5-compat functions delete-md5-compat
authorNiels Möller <nisse@lysator.liu.se>
Sat, 24 Aug 2024 18:33:10 +0000 (20:33 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Sat, 24 Aug 2024 18:33:10 +0000 (20:33 +0200)
Makefile.in
md5-compat.c [deleted file]
md5-compat.h [deleted file]
nettle.texinfo
testsuite/Makefile.in
testsuite/md5-compat-test.c [deleted file]

index 71ad761ec5c50b2dc2b3118a5db8aec03528efde..e428d6961b52db3376729457ddfbf84a77cbee1a 100644 (file)
@@ -130,7 +130,7 @@ nettle_SOURCES = aes-decrypt-internal.c aes-decrypt.c aes-decrypt-table.c \
                 hmac-streebog-meta.c hmac-sm3-meta.c \
                 knuth-lfib.c hkdf.c \
                 md2.c md2-meta.c md4.c md4-meta.c \
-                md5.c md5-compat.c md5-meta.c \
+                md5.c md5-meta.c \
                 memeql-sec.c memxor.c memxor3.c \
                 nettle-lookup-hash.c \
                 nettle-meta-aeads.c nettle-meta-armors.c \
@@ -239,8 +239,7 @@ HEADERS = aes.h arcfour.h arctwo.h asn1.h blowfish.h balloon.h \
          knuth-lfib.h hkdf.h \
          macros.h \
          cmac.h siv-cmac.h siv-gcm.h \
-         md2.h md4.h \
-         md5.h md5-compat.h \
+         md2.h md4.h md5.h \
          memops.h memxor.h \
          nettle-meta.h nettle-types.h \
          ocb.h pbkdf2.h \
diff --git a/md5-compat.c b/md5-compat.c
deleted file mode 100644 (file)
index d0d6176..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/* md5-compat.c
-
-   The md5 hash function, RFC 1321-style interface.
-
-   Copyright (C) 2001 Niels Möller
-
-   This file is part of GNU Nettle.
-
-   GNU Nettle is free software: you can redistribute it and/or
-   modify it under the terms of either:
-
-     * the GNU Lesser General Public License as published by the Free
-       Software Foundation; either version 3 of the License, or (at your
-       option) any later version.
-
-   or
-
-     * the GNU General Public License as published by the Free
-       Software Foundation; either version 2 of the License, or (at your
-       option) any later version.
-
-   or both in parallel, as here.
-
-   GNU Nettle is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received copies of the GNU General Public License and
-   the GNU Lesser General Public License along with this program.  If
-   not, see http://www.gnu.org/licenses/.
-*/
-
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "md5-compat.h"
-
-void
-MD5Init(MD5_CTX *ctx)
-{
-  md5_init(ctx);
-}
-
-void
-MD5Update(MD5_CTX *ctx, const unsigned char *data, unsigned int length)
-{
-  md5_update(ctx, length, data);
-}
-
-void
-MD5Final(unsigned char *out, MD5_CTX *ctx)
-{
-  md5_digest(ctx, MD5_DIGEST_SIZE, out);
-}
diff --git a/md5-compat.h b/md5-compat.h
deleted file mode 100644 (file)
index fd30982..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* md5-compat.h
-
-   The md5 hash function, RFC 1321-style interface.
-
-   Copyright (C) 2001 Niels Möller
-
-   This file is part of GNU Nettle.
-
-   GNU Nettle is free software: you can redistribute it and/or
-   modify it under the terms of either:
-
-     * the GNU Lesser General Public License as published by the Free
-       Software Foundation; either version 3 of the License, or (at your
-       option) any later version.
-
-   or
-
-     * the GNU General Public License as published by the Free
-       Software Foundation; either version 2 of the License, or (at your
-       option) any later version.
-
-   or both in parallel, as here.
-
-   GNU Nettle is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received copies of the GNU General Public License and
-   the GNU Lesser General Public License along with this program.  If
-   not, see http://www.gnu.org/licenses/.
-*/
-
-#ifndef NETTLE_MD5_COMPAT_H_INCLUDED
-#define NETTLE_MD5_COMPAT_H_INCLUDED
-
-#include "md5.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Name mangling */
-#define MD5Init nettle_MD5Init
-#define MD5Update nettle_MD5Update
-#define MD5Final nettle_MD5Final
-
-typedef struct md5_ctx MD5_CTX;
-
-void MD5Init(MD5_CTX *ctx);
-void MD5Update(MD5_CTX *ctx, const unsigned char *data, unsigned int length);
-void MD5Final(unsigned char *out, MD5_CTX *ctx);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* NETTLE_MD5_COMPAT_H_INCLUDED */
index 484480ca90fa19520fd3a6af2c00c94fd974d31f..70b01ab33fdf8512ed1a5353b51805dc3b9c5c06 100644 (file)
@@ -83,7 +83,6 @@ Reference
 * Randomness::
 * ASCII encoding::
 * Miscellaneous functions::
-* Compatibility functions::
 
 Hash functions
 
@@ -356,7 +355,6 @@ This chapter describes all the Nettle functions, grouped by family.
 * Randomness::
 * ASCII encoding::
 * Miscellaneous functions::
-* Compatibility functions::
 @end menu
 
 @node Hash functions
@@ -6597,20 +6595,6 @@ These functions are declared in @file{<nettle/memops.h>}. For
 compatibility with earlier versions of Nettle, @code{memxor} and
 @code{memxor3} are also declared in @file{<nettle/memxor.h>}.
 
-@node Compatibility functions
-@section Compatibility functions
-
-For convenience, Nettle includes alternative interfaces to some
-algorithms, for compatibility with some other popular crypto toolkits.
-These are not fully documented here; refer to the source or to the
-documentation for the original implementation.
-
-MD5 is defined in [RFC 1321], which includes a reference implementation.
-Nettle defines a compatible interface to MD5 in
-@file{<nettle/md5-compat.h>}. This file defines the typedef
-@code{MD5_CTX}, and declares the functions @code{MD5Init}, @code{MD5Update} and
-@code{MD5Final}.
-
 @node Nettle soup
 @chapter Traditional Nettle Soup
 For the serious nettle hacker, here is a recipe for nettle soup. 4 servings.
index 0699fa0d230ba528a395372b1465b1c3d236bc47..92e8559f8c8a1818d1a95a30cfdd37c29175224f 100644 (file)
@@ -16,7 +16,7 @@ TS_NETTLE_SOURCES = aes-test.c aes-keywrap-test.c arcfour-test.c arctwo-test.c \
                    camellia-test.c chacha-test.c \
                    cnd-memcpy-test.c \
                    des-test.c des3-test.c \
-                   md2-test.c md4-test.c md5-test.c md5-compat-test.c \
+                   md2-test.c md4-test.c md5-test.c \
                    memeql-test.c memxor-test.c gosthash94-test.c \
                    ripemd160-test.c hkdf-test.c \
                    salsa20-test.c \
diff --git a/testsuite/md5-compat-test.c b/testsuite/md5-compat-test.c
deleted file mode 100644 (file)
index e223400..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "testutils.h"
-#include "md5-compat.h"
-
-void
-test_main(void)
-{
-  MD5_CTX ctx;
-  unsigned char digest[MD5_DIGEST_SIZE];
-
-  MD5Init(&ctx);
-  MD5Final(digest, &ctx);
-  ASSERT(MEMEQ(MD5_DIGEST_SIZE, digest,
-              H("D41D8CD98F00B204 E9800998ECF8427E")));
-
-  MD5Init(&ctx);
-  MD5Update(&ctx, US("a"), 1);
-  MD5Final(digest, &ctx);
-  ASSERT(MEMEQ(MD5_DIGEST_SIZE, digest,
-              H("0CC175B9C0F1B6A8 31C399E269772661")));
-
-  MD5Init(&ctx);
-  MD5Update(&ctx, US("abc"), 3);
-  MD5Final(digest, &ctx);
-  ASSERT(MEMEQ(MD5_DIGEST_SIZE, digest,
-              H("900150983cd24fb0 D6963F7D28E17F72")));
-
-  MD5Init(&ctx);
-  MD5Update(&ctx, US("message digest"), 14);
-  MD5Final(digest, &ctx);
-  ASSERT(MEMEQ(MD5_DIGEST_SIZE, digest,
-              H("F96B697D7CB7938D 525A2F31AAF161D0")));
-
-  MD5Init(&ctx);
-  MD5Update(&ctx, US("abcdefghijklmnopqrstuvwxyz"), 26);
-  MD5Final(digest, &ctx);
-  ASSERT(MEMEQ(MD5_DIGEST_SIZE, digest,
-              H("C3FCD3D76192E400 7DFB496CCA67E13B")));
-
-  MD5Init(&ctx);
-  MD5Update(&ctx, US("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"), 62);
-  MD5Final(digest, &ctx);
-  ASSERT(MEMEQ(MD5_DIGEST_SIZE, digest,
-              H("D174AB98D277D9F5 A5611C2C9F419D9F")));
-
-  MD5Init(&ctx);
-  MD5Update(&ctx, US("1234567890123456789012345678901234567890"
-                    "1234567890123456789012345678901234567890"),
-           80);
-  MD5Final(digest, &ctx);
-  ASSERT(MEMEQ(MD5_DIGEST_SIZE, digest,
-              H("57EDF4A22BE3C955 AC49DA2E2107B67A")));
-}