added copyright notes for publishing. Removed unused file.

This commit is contained in:
Andreas 2015-08-11 12:23:30 +02:00
parent 1826fb26ff
commit d80a463e53
17 changed files with 63 additions and 20 deletions

7
hash.c
View File

@ -1,4 +1,9 @@
#include "params.h" /*
hash.c version 20150811
Andreas Hülsing
Public domain.
*/
#include "prg.h" #include "prg.h"
#include <stddef.h> #include <stddef.h>

8
hash.h
View File

@ -1,8 +1,12 @@
/*
hash.h version 20150811
Andreas Hülsing
Public domain.
*/
#ifndef HASH_H #ifndef HASH_H
#define 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 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_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); int hash_2n_n(unsigned char *out,const unsigned char *in, const unsigned char *pub_seed, unsigned char addr[16], const int n);

View File

@ -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

7
prg.c
View File

@ -1,5 +1,10 @@
/*
prg.c version 20150811
Andreas Hülsing
Public domain.
*/
#include "chacha.h" #include "chacha.h"
//#include "params.h"
#include "prg.h" #include "prg.h"
const unsigned char zero_nonce[12] = {0}; const unsigned char zero_nonce[12] = {0};

6
prg.h
View File

@ -1,3 +1,9 @@
/*
prg.h version 20150811
Andreas Hülsing
Public domain.
*/
#ifndef PRG_H #ifndef PRG_H
#define PRG_H #define PRG_H
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,3 +1,7 @@
/*
This code was taken from the SPHINCS reference implementation and is public domain.
*/
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>

Binary file not shown.

Binary file not shown.

View File

@ -1,7 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include "../wots.h" #include "../wots.h"
#include "../randombytes.h" #include "../randombytes.h"
#include "../params.h"
static void hexdump(unsigned char *a, size_t len) static void hexdump(unsigned char *a, size_t len)
{ {

Binary file not shown.

2
wots.c
View File

@ -1,5 +1,5 @@
/* /*
wots.c version 2015xxxx wots.c version 20150811
Andreas Hülsing Andreas Hülsing
Public domain. Public domain.
*/ */

7
wots.h
View File

@ -1,7 +1,12 @@
/*
wots.h version 20150811
Andreas Hülsing
Public domain.
*/
#ifndef WOTS_H #ifndef WOTS_H
#define WOTS_H #define WOTS_H
#include "params.h"
/** /**
* WOTS parameter set * WOTS parameter set
* *

6
xmss.c
View File

@ -1,3 +1,9 @@
/*
xmss.c version 20150811
Andreas Hülsing
Public domain.
*/
#include "xmss.h" #include "xmss.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

6
xmss.h
View File

@ -1,3 +1,9 @@
/*
xmss.h version 20150811
Andreas Hülsing
Public domain.
*/
#include "wots.h" #include "wots.h"
#ifndef XMSS_H #ifndef XMSS_H

View File

@ -1,3 +1,9 @@
/*
xmss_commons.c version 20150811
Andreas Hülsing
Public domain.
*/
#include "xmss_commons.h" #include "xmss_commons.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>

View File

@ -1,3 +1,8 @@
/*
xmss_commons.h version 20150811
Andreas Hülsing
Public domain.
*/
#ifndef XMSS_COMMONS_H #ifndef XMSS_COMMONS_H
#define XMSS_COMMONS_H #define XMSS_COMMONS_H

View File

@ -1,3 +1,8 @@
/*
This code was taken from the SPHINCS reference implementation.
Public domain.
*/
#include "zerobytes.h" #include "zerobytes.h"
unsigned char *zerobytes(unsigned char *r,unsigned long long n) unsigned char *zerobytes(unsigned char *r,unsigned long long n)