diff --git a/hash.c b/hash.c index 4aeb87b..e009aad 100644 --- a/hash.c +++ b/hash.c @@ -1,4 +1,9 @@ -#include "params.h" +/* +hash.c version 20150811 +Andreas Hülsing +Public domain. +*/ + #include "prg.h" #include diff --git a/hash.h b/hash.h index 1f6bfd6..8e4dd9f 100644 --- a/hash.h +++ b/hash.h @@ -1,8 +1,12 @@ +/* +hash.h version 20150811 +Andreas Hülsing +Public domain. +*/ + #ifndef HASH_H #define HASH_H -#include "params.h" - int prf_m(unsigned char *out, const unsigned char *in, size_t inlen, const unsigned char *key, int keylen); int hash_m(unsigned char *out,const unsigned char *in,unsigned long long inlen, const unsigned char *key, const int keylen, const int m); int hash_2n_n(unsigned char *out,const unsigned char *in, const unsigned char *pub_seed, unsigned char addr[16], const int n); diff --git a/params.h b/params.h deleted file mode 100644 index 897e904..0000000 --- a/params.h +++ /dev/null @@ -1,13 +0,0 @@ -#define TREE_HEIGHT 10 -#define WOTS_LOGW 4 // -> w = 16 - -#define SK_RAND_SEED_BYTES 32 -#define MESSAGE_HASH_SEED_BYTES 32 - -#define WOTS_W (1 << WOTS_LOGW) -#define WOTS_L1 ((256+WOTS_LOGW-1)/WOTS_LOGW) -#define WOTS_L 67 // for WOTS_W == 16 -#define WOTS_LOG_L 7 // for WOTS_W == 16 -#define WOTS_SIGBYTES (WOTS_L*HASH_BYTES) - -#define HASH_BYTES 32 diff --git a/prg.c b/prg.c index 01bd7e3..915df75 100644 --- a/prg.c +++ b/prg.c @@ -1,5 +1,10 @@ +/* +prg.c version 20150811 +Andreas Hülsing +Public domain. +*/ + #include "chacha.h" -//#include "params.h" #include "prg.h" const unsigned char zero_nonce[12] = {0}; diff --git a/prg.h b/prg.h index ae5bd06..88b17e1 100644 --- a/prg.h +++ b/prg.h @@ -1,3 +1,9 @@ +/* +prg.h version 20150811 +Andreas Hülsing +Public domain. +*/ + #ifndef PRG_H #define PRG_H #include diff --git a/randombytes.c b/randombytes.c index f3b8d41..310d1ce 100644 --- a/randombytes.c +++ b/randombytes.c @@ -1,3 +1,7 @@ +/* +This code was taken from the SPHINCS reference implementation and is public domain. +*/ + #include #include #include diff --git a/test/test_chacha b/test/test_chacha index 335b7d8..9a032af 100755 Binary files a/test/test_chacha and b/test/test_chacha differ diff --git a/test/test_wots b/test/test_wots index 8c743cc..0e31151 100755 Binary files a/test/test_wots and b/test/test_wots differ diff --git a/test/test_wots.c b/test/test_wots.c index aa496a3..aeb4073 100644 --- a/test/test_wots.c +++ b/test/test_wots.c @@ -1,7 +1,6 @@ #include #include "../wots.h" #include "../randombytes.h" -#include "../params.h" static void hexdump(unsigned char *a, size_t len) { diff --git a/test/test_xmss b/test/test_xmss index a50c78a..0f79b62 100755 Binary files a/test/test_xmss and b/test/test_xmss differ diff --git a/wots.c b/wots.c index 04ee5cb..b0ca2ad 100644 --- a/wots.c +++ b/wots.c @@ -1,5 +1,5 @@ /* -wots.c version 2015xxxx +wots.c version 20150811 Andreas Hülsing Public domain. */ diff --git a/wots.h b/wots.h index 3c03469..3ca70a4 100644 --- a/wots.h +++ b/wots.h @@ -1,7 +1,12 @@ +/* +wots.h version 20150811 +Andreas Hülsing +Public domain. +*/ + #ifndef WOTS_H #define WOTS_H -#include "params.h" /** * WOTS parameter set * diff --git a/xmss.c b/xmss.c index 3d05a5f..275d432 100644 --- a/xmss.c +++ b/xmss.c @@ -1,3 +1,9 @@ +/* +xmss.c version 20150811 +Andreas Hülsing +Public domain. +*/ + #include "xmss.h" #include #include diff --git a/xmss.h b/xmss.h index e7ee288..c95907a 100644 --- a/xmss.h +++ b/xmss.h @@ -1,3 +1,9 @@ +/* +xmss.h version 20150811 +Andreas Hülsing +Public domain. +*/ + #include "wots.h" #ifndef XMSS_H diff --git a/xmss_commons.c b/xmss_commons.c index 4457697..834fa5e 100644 --- a/xmss_commons.c +++ b/xmss_commons.c @@ -1,3 +1,9 @@ +/* +xmss_commons.c version 20150811 +Andreas Hülsing +Public domain. +*/ + #include "xmss_commons.h" #include #include diff --git a/xmss_commons.h b/xmss_commons.h index be21195..4b780cf 100644 --- a/xmss_commons.h +++ b/xmss_commons.h @@ -1,3 +1,8 @@ +/* +xmss_commons.h version 20150811 +Andreas Hülsing +Public domain. +*/ #ifndef XMSS_COMMONS_H #define XMSS_COMMONS_H diff --git a/zerobytes.c b/zerobytes.c index bf04984..04056d2 100644 --- a/zerobytes.c +++ b/zerobytes.c @@ -1,3 +1,8 @@ +/* +This code was taken from the SPHINCS reference implementation. +Public domain. +*/ + #include "zerobytes.h" unsigned char *zerobytes(unsigned char *r,unsigned long long n)