From c8a25186e510d8f15e54a5b4763e30e0ee9981f4 Mon Sep 17 00:00:00 2001 From: Jason Self Date: Sun, 24 Feb 2019 13:04:03 -0800 Subject: [PATCH 1/1] Remove SHA3 references Skein was one of the finalists in the NIST competition to develop a new hash function called SHA-3. Skein made it all the way through to the end but was ultimately not selected. Since skeinsum uses the reference implementation that was submitted to NIST for the SHA-3 competition it contained references to SHA3. This commit removes them, since Skein wasn't selected and isn't SHA-3. --- makefile.am | 8 ++++---- skein.h | 2 +- skein_cli.c | 2 +- SHA3api_ref.c => skeinapi_ref.c | 2 +- SHA3api_ref.h => skeinapi_ref.h | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename SHA3api_ref.c => skeinapi_ref.c (96%) rename SHA3api_ref.h => skeinapi_ref.h (93%) diff --git a/makefile.am b/makefile.am index 741052d..567b923 100644 --- a/makefile.am +++ b/makefile.am @@ -1,5 +1,5 @@ bin_PROGRAMS = skein256sum skein512sum skein1024sum -skein256sum_SOURCES = SHA3api_ref.c skein.c skein256.c skein_block.c skein_debug.c skein_cli.c -skein512sum_SOURCES = SHA3api_ref.c skein.c skein512.c skein_block.c skein_debug.c skein_cli.c -skein1024sum_SOURCES = SHA3api_ref.c skein.c skein1024.c skein_block.c skein_debug.c skein_cli.c -include_HEADERS = brg_endian.h brg_types.h SHA3api_ref.h skein.h skein_debug.h skein_port.h +skein256sum_SOURCES = skeinapi_ref.c skein.c skein256.c skein_block.c skein_debug.c skein_cli.c +skein512sum_SOURCES = skeinapi_ref.c skein.c skein512.c skein_block.c skein_debug.c skein_cli.c +skein1024sum_SOURCES = skeinapi_ref.c skein.c skein1024.c skein_block.c skein_debug.c skein_cli.c +include_HEADERS = brg_endian.h brg_types.h skeinapi_ref.h skein.h skein_debug.h skein_port.h diff --git a/skein.h b/skein.h index b4717ff..7160fc6 100644 --- a/skein.h +++ b/skein.h @@ -192,7 +192,7 @@ int Skein1024_Output (Skein1024_Ctxt_t *ctx, u08b_t * hashVal); #define SKEIN_VERSION (1) #ifndef SKEIN_ID_STRING_LE /* allow compile-time personalization */ -#define SKEIN_ID_STRING_LE (0x33414853) /* "SHA3" (little-endian)*/ +#define SKEIN_ID_STRING_LE (0x33414853) /* "skein" (little-endian)*/ #endif #define SKEIN_MK_64(hi32,lo32) ((lo32) + (((u64b_t) (hi32)) << 32)) diff --git a/skein_cli.c b/skein_cli.c index 34c2a6a..bb82354 100644 --- a/skein_cli.c +++ b/skein_cli.c @@ -29,7 +29,7 @@ along with skeinsum. If not, see . #include #include #include -#include "SHA3api_ref.h" +#include "skeinapi_ref.h" #define WARN(msg, ...) fprintf(stderr, "skein%dsum: " msg, hashbitlen, ##__VA_ARGS__) diff --git a/SHA3api_ref.c b/skeinapi_ref.c similarity index 96% rename from SHA3api_ref.c rename to skeinapi_ref.c index cab5c69..cedcceb 100644 --- a/SHA3api_ref.c +++ b/skeinapi_ref.c @@ -10,7 +10,7 @@ #include /* get the memcpy/memset functions */ #include "skein.h" /* get the Skein API definitions */ -#include "SHA3api_ref.h"/* get the AHS API definitions */ +#include "skeinapi_ref.h"/* get the AHS API definitions */ //#define SKEIN_DEBUG 1 #ifdef SKEIN_DEBUG diff --git a/SHA3api_ref.h b/skeinapi_ref.h similarity index 93% rename from SHA3api_ref.h rename to skeinapi_ref.h index 93e81f6..9aa4fdb 100644 --- a/SHA3api_ref.h +++ b/skeinapi_ref.h @@ -49,7 +49,7 @@ HashReturn Hash (int hashbitlen, const BitSequence *data, /* ** Re-define the compile-time constants below to change the selection -** of the Skein state size in the Init() function in SHA3api_ref.c. +** of the Skein state size in the Init() function in skeinapi_ref.c. ** ** That is, the NIST API does not allow for explicit selection of the ** Skein block size, so it must be done implicitly in the Init() function. -- 2.31.1