From d80a463e532d982af9f9f11beba61d925b82e08a Mon Sep 17 00:00:00 2001 From: Andreas Date: Tue, 11 Aug 2015 12:23:30 +0200 Subject: [PATCH] added copyright notes for publishing. Removed unused file. --- hash.c | 7 ++++++- hash.h | 8 ++++++-- params.h | 13 ------------- prg.c | 7 ++++++- prg.h | 6 ++++++ randombytes.c | 4 ++++ test/test_chacha | Bin 26613 -> 26613 bytes test/test_wots | Bin 62796 -> 62796 bytes test/test_wots.c | 1 - test/test_xmss | Bin 102006 -> 102006 bytes wots.c | 2 +- wots.h | 7 ++++++- xmss.c | 6 ++++++ xmss.h | 6 ++++++ xmss_commons.c | 6 ++++++ xmss_commons.h | 5 +++++ zerobytes.c | 5 +++++ 17 files changed, 63 insertions(+), 20 deletions(-) delete mode 100644 params.h 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 335b7d81253422d4b889f190862b22e093dc6e65..9a032af9818bbd30d18273b658322a4a537615a8 100755 GIT binary patch delta 378 zcmex*p7HB>#tkh@B3JpI=Y%a4NxY(Ph}n(z!oJVYYqn! zP)891qXfvbU{0865+KuhfLw@a5+Ku#f@Hy_NlXCB{sVChL5726&AAvDcrzIorQASf z^I3x=q(P=LO$^}g2JsXotEopaa&2x<_hn?{n|w|~%7V`nsNexNQ0Hop3chJTt(rVQ z?LdPB!hxJtAcy}tknt4iat9!rQFgL|W)7ps#tkh@BIc>{y*A90WV3$9RAH%GwUe*JeeLEMOohsfT$8!fr1ZG-85tPz zIT#q&b$|>;uGtI>3@duM1tx*I=5R0p zbrdl$3WH1w=7gCh3^J_;$c30D3^MH~NEU3G@C2ajKM>atWH?yXoQr{hH*fY^Uq+xG&S^+laG3%XJm3cETn$peH4Ug$lLx3B zXb?|0kkbm}@LvZqotPFB#&VHB9$t69j%vH8CyBReDKWJW_RM*ht@h7&j$ zxi;^$;se=n##%yIjKhnCkvVUd_e^G<3Csm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Jc~!)XR1kOj@6=+RFCyts*tyn<56Ixvo`CV*YdLzSC$OC|D1Vd#(&px8d&y0SxRVa@xx(4CoJT}6)~Gm!b-ozyn$Iis!tNdkO@q6ZD&;%zJu5#c z3vIX8Wl{Em@KrbR1=w}hj-7^s@%L^R)=J@R^Hnt=Y{2rl9d*@ zOp?4LYvS@sWzRf0rCdizc4lQ&2`Qw7+n_azHx6C0rj)peEANP8U%=X=P~9(H=o{gx zKBM2k<0_ACPCOi{W|E0F$u^}hQYB~N7~xTB(c5*t?wD-P$~zC4Wch(1R5n}(nt_?} zdcEri!?>a*p221kCdc~_Y9x48w*lCkw6vyw& z!@WxFI?2j7XEy1oT7y97-#~0UJSTRM9l}{FltPSo #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 a50c78a84b88d078af6a7c001b3e5f316452e455..0f79b6284cdf00593af4fb3476089060528ce7d6 100755 GIT binary patch delta 4440 zcmZWsdsLNG7C-y@F7OGLdoPy@TrdS6`Ai`ZFh!*q(+REAG{MSOqM!(xT=4;1pH10A z^!Q8=(6O{g9d8bkIcrf;fsTgdpevnenrv#V=8vXHv(lR1-uEJF*6_!7f4{x=+2?om zKIi)mH)_If)Px_~Xn2M_ajZ4{o)zECc6A`zx?u?#v??Jt3+yw|HLx4d%{_LvWZK-X)5JG=TIfQk2c( z%xI;0Cqw6DC#>^)3lxpEgBG}yN}3p^)MGtzl>T{1G~K7|B}ZwNK2?%3br$PsLx`+( z7V8-kgBe}C8leHE`Mes59pFYR$})@9)PnR@(EkfSaL)O9XlX*ff-o3&#=@Hha1x+z zKhC(I2k57uEPJ6|T-uZ71~!-eil{=LTbeSpg5^x{gydAPocFy#t0$3R(5 z1PP|gNDc3DEdjbFgnGXY)~O7SAdcMF9ywoZ2L=7Of^ z8ecv|25$Hsq7ja7`sQ$;+9gl8YcddIU#ZB!z||e;_Hq)(PDJE`I*{F^*OVtw552Rz zm^|8Cx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1t*Y>-CGME|k1w9tAa`VtgYD7qqH(DLMaJa>hYel~EMJJDC<+zIueVL7C*=LxXVU_?cY6Uf%RAfW^Tyh7lw8u=FdCo9DR_G2 zYCQYMwuZ%2Cw)7AOQYoZol_`H#_f8QTIH2pIrLI!VB=My_N`6*gYBwIkCk*)y`8u# zFECeKYgb*l$y{}F!h3)ueXSq$+SeLnl;Qt};VgPAWESnOV(0s6>xl z1x;VZashr;-c{#Q z^2a9MlN~e*R=*$a8i2t8xYe0?lghwf12-FRHr#+U!69n9p9}N);1IRt{}|@`g6W5N z-VfCZ9$q2D_*86ueD8zJz345uyE%_K<+shLbV=T`CzWo59^LbVMuu$PH>7{>Ubx|8 z^0zpXk6!mfWYyv25#g44OA@Z zreq-jUfb%4`I{2(CWUq2Knps4K#01p*&`ljzq+s4os2DR&TWrmY`B*SyNi+24V#;h$6X=p9!BPU%^t-gVqFD*ta5kn)0!>TcUN8zG|VqpR)D$ zs#~9iV^h#fkezbhxT%5Rfwh4H#tgkQL-)zc7dnFPRvDOBXcmipn1v_=BUbW%#;(9N zR;j!fy93*_3^q;RM>#*Pgkw6Zpjt&E7_VBL^{=$- z`}Dt7v-3zbSLkDE)yuPu_|)R`2gmEHGIU4APm1AfQQm7?-))<-w%XwRcbhT-aNK3w zvYKl4)M%XVwrbf;)z(c_3t|68%QLPt?>7S2Lnl?q^w%|PG<1iHqu_s9e|zo_KFQs@2gk4hHVpyzD_xvt0o{j%=Q)}1vE!SsIRW%&2%ob;MXRI>*e58E!^5fJ~_P^3E;<7M{uIbN*a;`Kt yHGEk}w&P!v(_Fij7$-maJhq`=HT9>J4Qp4^L@I1}jsHz*pi2ICd{QN)MgJFUKuG5R 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)