2017-10-19 15:04:42 +01:00
|
|
|
#ifndef XMSS_HASH_H
|
|
|
|
#define XMSS_HASH_H
|
2015-08-11 11:08:27 +01:00
|
|
|
|
2017-10-19 15:17:07 +01:00
|
|
|
#include <stdint.h>
|
2017-10-16 10:58:45 +01:00
|
|
|
#include "params.h"
|
|
|
|
|
2017-10-23 13:10:39 +01:00
|
|
|
void addr_to_bytes(unsigned char *bytes, const uint32_t addr[8]);
|
2017-08-03 16:38:34 +01:00
|
|
|
|
2017-10-16 10:58:45 +01:00
|
|
|
int prf(const xmss_params *params,
|
|
|
|
unsigned char *out, const unsigned char *in,
|
2017-08-03 16:38:34 +01:00
|
|
|
const unsigned char *key, unsigned int keylen);
|
|
|
|
|
2017-10-16 10:58:45 +01:00
|
|
|
int h_msg(const xmss_params *params,
|
|
|
|
unsigned char *out,
|
2017-08-03 16:38:34 +01:00
|
|
|
const unsigned char *in, unsigned long long inlen,
|
|
|
|
const unsigned char *key, const unsigned int keylen);
|
|
|
|
|
2017-10-16 10:58:45 +01:00
|
|
|
int hash_h(const xmss_params *params,
|
|
|
|
unsigned char *out, const unsigned char *in,
|
2017-08-03 16:38:34 +01:00
|
|
|
const unsigned char *pub_seed, uint32_t addr[8]);
|
|
|
|
|
2017-10-16 10:58:45 +01:00
|
|
|
int hash_f(const xmss_params *params,
|
|
|
|
unsigned char *out, const unsigned char *in,
|
2017-08-03 16:38:34 +01:00
|
|
|
const unsigned char *pub_seed, uint32_t addr[8]);
|
2015-08-11 11:08:27 +01:00
|
|
|
|
2017-10-30 16:24:10 +00:00
|
|
|
int hash_message(const xmss_params *params, unsigned char *out,
|
|
|
|
const unsigned char *R, const unsigned char *root,
|
|
|
|
unsigned long long idx,
|
|
|
|
unsigned char *m_with_prefix, unsigned long long mlen);
|
|
|
|
|
2015-08-11 11:08:27 +01:00
|
|
|
#endif
|