@@ -5,10 +5,12 @@ | |||||
* from https://twitter.com/tweetfips202 | * from https://twitter.com/tweetfips202 | ||||
* by Gilles Van Assche, Daniel J. Bernstein, and Peter Schwabe */ | * by Gilles Van Assche, Daniel J. Bernstein, and Peter Schwabe */ | ||||
#include <stdint.h> | |||||
#include <assert.h> | |||||
#include "fips202.h" | #include "fips202.h" | ||||
#include <assert.h> | |||||
#include <stdint.h> | |||||
#include <string.h> | |||||
#define NROUNDS 24 | #define NROUNDS 24 | ||||
#define ROL(a, offset) ((a << offset) ^ (a >> (64-offset))) | #define ROL(a, offset) ((a << offset) ^ (a >> (64-offset))) | ||||
@@ -324,8 +326,6 @@ void KeccakF1600_StatePermute(uint64_t * state) | |||||
state[24] = Asu; | state[24] = Asu; | ||||
} | } | ||||
#include <string.h> | |||||
static void keccak_absorb(uint64_t *s, unsigned int r, | static void keccak_absorb(uint64_t *s, unsigned int r, | ||||
const unsigned char *m, unsigned long long mlen, | const unsigned char *m, unsigned long long mlen, | ||||
unsigned char p) | unsigned char p) | ||||
@@ -8,6 +8,7 @@ Public domain. | |||||
#ifndef XMSS_HASH_H | #ifndef XMSS_HASH_H | ||||
#define XMSS_HASH_H | #define XMSS_HASH_H | ||||
#include <stdint.h> | |||||
#include "params.h" | #include "params.h" | ||||
#define IS_LITTLE_ENDIAN 1 | #define IS_LITTLE_ENDIAN 1 | ||||
@@ -7,14 +7,11 @@ Public domain. | |||||
#ifndef XMSS_COMMONS_H | #ifndef XMSS_COMMONS_H | ||||
#define XMSS_COMMONS_H | #define XMSS_COMMONS_H | ||||
#include <stdlib.h> | |||||
#include <stdint.h> | #include <stdint.h> | ||||
#include "params.h" | #include "params.h" | ||||
void to_byte(unsigned char *output, unsigned long long in, uint32_t bytes); | void to_byte(unsigned char *output, unsigned long long in, uint32_t bytes); | ||||
void hexdump(const unsigned char *a, size_t len); | |||||
void gen_leaf_wots(const xmss_params *params, unsigned char *leaf, | void gen_leaf_wots(const xmss_params *params, unsigned char *leaf, | ||||
const unsigned char *sk_seed, const unsigned char *pub_seed, | const unsigned char *sk_seed, const unsigned char *pub_seed, | ||||
uint32_t ltree_addr[8], uint32_t ots_addr[8]); | uint32_t ltree_addr[8], uint32_t ots_addr[8]); | ||||
@@ -4,12 +4,11 @@ Andreas Hülsing | |||||
Joost Rijneveld | Joost Rijneveld | ||||
Public domain. | Public domain. | ||||
*/ | */ | ||||
#include "wots.h" | |||||
#ifndef XMSS_CORE_H | #ifndef XMSS_CORE_H | ||||
#define XMSS_CORE_H | #define XMSS_CORE_H | ||||
#include "params.h" | |||||
/** | /** | ||||
* Generates a XMSS key pair for a given parameter set. | * Generates a XMSS key pair for a given parameter set. | ||||
* Format sk: [(32bit) idx || SK_SEED || SK_PRF || PUB_SEED || root] | * Format sk: [(32bit) idx || SK_SEED || SK_PRF || PUB_SEED || root] | ||||