Browse Source

added copyright notes for publishing. Removed unused file.

master
Andreas 9 years ago
parent
commit
d80a463e53
17 changed files with 63 additions and 20 deletions
  1. +6
    -1
      hash.c
  2. +6
    -2
      hash.h
  3. +0
    -13
      params.h
  4. +6
    -1
      prg.c
  5. +6
    -0
      prg.h
  6. +4
    -0
      randombytes.c
  7. BIN
     
  8. BIN
     
  9. +0
    -1
      test/test_wots.c
  10. BIN
     
  11. +1
    -1
      wots.c
  12. +6
    -1
      wots.h
  13. +6
    -0
      xmss.c
  14. +6
    -0
      xmss.h
  15. +6
    -0
      xmss_commons.c
  16. +5
    -0
      xmss_commons.h
  17. +5
    -0
      zerobytes.c

+ 6
- 1
hash.c View File

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

#include "prg.h"

#include <stddef.h>


+ 6
- 2
hash.h View File

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


+ 0
- 13
params.h 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

+ 6
- 1
prg.c View File

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


+ 6
- 0
prg.h View File

@@ -1,3 +1,9 @@
/*
prg.h version 20150811
Andreas Hülsing
Public domain.
*/

#ifndef PRG_H
#define PRG_H
#include <stdlib.h>


+ 4
- 0
randombytes.c 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/stat.h>
#include <fcntl.h>


BIN
View File


BIN
View File


+ 0
- 1
test/test_wots.c View File

@@ -1,7 +1,6 @@
#include <stdio.h>
#include "../wots.h"
#include "../randombytes.h"
#include "../params.h"

static void hexdump(unsigned char *a, size_t len)
{


BIN
View File


+ 1
- 1
wots.c View File

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


+ 6
- 1
wots.h View File

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


+ 6
- 0
xmss.c View File

@@ -1,3 +1,9 @@
/*
xmss.c version 20150811
Andreas Hülsing
Public domain.
*/

#include "xmss.h"
#include <stdlib.h>
#include <string.h>


+ 6
- 0
xmss.h View File

@@ -1,3 +1,9 @@
/*
xmss.h version 20150811
Andreas Hülsing
Public domain.
*/

#include "wots.h"

#ifndef XMSS_H


+ 6
- 0
xmss_commons.c View File

@@ -1,3 +1,9 @@
/*
xmss_commons.c version 20150811
Andreas Hülsing
Public domain.
*/

#include "xmss_commons.h"
#include <stdlib.h>
#include <stdio.h>


+ 5
- 0
xmss_commons.h View File

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



+ 5
- 0
zerobytes.c View File

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


Loading…
Cancel
Save