From 4975c494d984f004b6274255156371e44c93438b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se> Date: Sun, 16 Mar 2014 22:48:23 +0100 Subject: [PATCH] Deleted nettle_cipher nettle_arcfour128. --- ChangeLog | 11 +++++++++++ Makefile.in | 2 +- arcfour-meta.c | 38 ------------------------------------ examples/nettle-benchmark.c | 1 - examples/nettle-openssl.c | 24 ----------------------- nettle-meta-ciphers.c | 1 - nettle-meta.h | 2 -- testsuite/meta-cipher-test.c | 1 - 8 files changed, 12 insertions(+), 68 deletions(-) delete mode 100644 arcfour-meta.c diff --git a/ChangeLog b/ChangeLog index f408d1ef..c92c2a05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2014-03-16 Niels Möller <nisse@lysator.liu.se> + + * arcfour-meta.c: Deleted file. + * nettle-meta.h (nettle_arcfour128): Deleted declaration. + * nettle-meta-ciphers.c (nettle_ciphers): Deleted + nettle_arcfour128 from list. + * Makefile.in (nettle_SOURCES): Deleted arcfour-meta.c. + * examples/nettle-openssl.c (nettle_openssl_arcfour128): Deleted. + * testsuite/meta-cipher-test.c: Adjust test for removal of + nettle_arcfour128. + 2014-03-15 Niels Möller <nisse@lysator.liu.se> * examples/nettle-benchmark.c (struct bench_aead_info): New diff --git a/Makefile.in b/Makefile.in index 522c774d..d88e331f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -72,7 +72,7 @@ nettle_SOURCES = aes-decrypt-internal.c aes-decrypt.c \ aes192-meta.c \ aes256-set-encrypt-key.c aes256-set-decrypt-key.c \ aes256-meta.c \ - arcfour.c arcfour-crypt.c arcfour-meta.c \ + arcfour.c arcfour-crypt.c \ arctwo.c arctwo-meta.c blowfish.c \ base16-encode.c base16-decode.c base16-meta.c \ base64-encode.c base64-decode.c base64-meta.c \ diff --git a/arcfour-meta.c b/arcfour-meta.c deleted file mode 100644 index 70ec1066..00000000 --- a/arcfour-meta.c +++ /dev/null @@ -1,38 +0,0 @@ -/* arcfour-meta.c */ - -/* nettle, low-level cryptographics library - * - * Copyright (C) 2002 Niels Möller - * - * The nettle library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * The nettle library 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 Lesser General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with the nettle library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02111-1301, USA. - */ - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include "nettle-meta.h" - -#include "arcfour.h" - -const struct nettle_cipher nettle_arcfour128 = - { "arcfour128", sizeof(struct arcfour_ctx), - 0, ARCFOUR128_KEY_SIZE, - (nettle_set_key_func *) arcfour128_set_key, - (nettle_set_key_func *) arcfour128_set_key, - (nettle_crypt_func *) arcfour_crypt, - (nettle_crypt_func *) arcfour_crypt - }; diff --git a/examples/nettle-benchmark.c b/examples/nettle-benchmark.c index a84e9dac..8a15891a 100644 --- a/examples/nettle-benchmark.c +++ b/examples/nettle-benchmark.c @@ -735,7 +735,6 @@ main(int argc, char **argv) OPENSSL(&nettle_openssl_aes128) OPENSSL(&nettle_openssl_aes192) OPENSSL(&nettle_openssl_aes256) - &nettle_arcfour128, OPENSSL(&nettle_openssl_arcfour128) &nettle_blowfish128, OPENSSL(&nettle_openssl_blowfish128) &nettle_camellia128, &nettle_camellia192, &nettle_camellia256, &nettle_cast128, OPENSSL(&nettle_openssl_cast128) diff --git a/examples/nettle-openssl.c b/examples/nettle-openssl.c index 25aa5e97..a2678363 100644 --- a/examples/nettle-openssl.c +++ b/examples/nettle-openssl.c @@ -149,30 +149,6 @@ nettle_openssl_aes256 = { openssl_aes_encrypt, openssl_aes_decrypt }; -/* Arcfour */ -static nettle_set_key_func openssl_arcfour128_set_key; -static void -openssl_arcfour128_set_key(void *ctx, const uint8_t *key) -{ - RC4_set_key(ctx, 16, key); -} - -static nettle_crypt_func openssl_arcfour_crypt; -static void -openssl_arcfour_crypt(void *ctx, size_t length, - uint8_t *dst, const uint8_t *src) -{ - RC4(ctx, length, src, dst); -} - -const struct nettle_cipher -nettle_openssl_arcfour128 = { - "openssl arcfour128", sizeof(RC4_KEY), - 0, 16, - openssl_arcfour128_set_key, openssl_arcfour128_set_key, - openssl_arcfour_crypt, openssl_arcfour_crypt -}; - /* Blowfish */ static nettle_set_key_func openssl_bf128_set_key; static void diff --git a/nettle-meta-ciphers.c b/nettle-meta-ciphers.c index 316cf87b..d618bc76 100644 --- a/nettle-meta-ciphers.c +++ b/nettle-meta-ciphers.c @@ -31,7 +31,6 @@ const struct nettle_cipher * const nettle_ciphers[] = { &nettle_aes128, &nettle_aes192, &nettle_aes256, - &nettle_arcfour128, &nettle_camellia128, &nettle_camellia192, &nettle_camellia256, diff --git a/nettle-meta.h b/nettle-meta.h index 2c9506b5..f7b8675f 100644 --- a/nettle-meta.h +++ b/nettle-meta.h @@ -59,8 +59,6 @@ extern const struct nettle_cipher nettle_aes128; extern const struct nettle_cipher nettle_aes192; extern const struct nettle_cipher nettle_aes256; -extern const struct nettle_cipher nettle_arcfour128; - extern const struct nettle_cipher nettle_camellia128; extern const struct nettle_cipher nettle_camellia192; extern const struct nettle_cipher nettle_camellia256; diff --git a/testsuite/meta-cipher-test.c b/testsuite/meta-cipher-test.c index e252addd..f949fd76 100644 --- a/testsuite/meta-cipher-test.c +++ b/testsuite/meta-cipher-test.c @@ -9,7 +9,6 @@ const char* ciphers[] = { "arctwo64", "arctwo128", "arctwo_gutmann128", - "arcfour128", "camellia128", "camellia192", "camellia256", -- GitLab