-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwots_c.h
More file actions
31 lines (27 loc) · 1.54 KB
/
wots_c.h
File metadata and controls
31 lines (27 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef WOTS_C_H
#define WOTS_C_H
#include <array>
#include <vector>
#include <cmath>
#include <openssl/sha.h>
#include <stdexcept>
#include <atomic>
#include <thread>
#include "address.h"
#include "constants.h"
#include "hash.h"
using namespace Parameters;
using namespace AddressTypes;
using namespace Address;
using namespace HASH;
namespace WOTS_C
{
void base_w(const unsigned char* message, unsigned char* out_buffer);
void chain(const unsigned char* m, uint32_t start, uint32_t steps, SHA256_CTX hash_ctx, unsigned char* adrs, unsigned char* out);
unsigned char* wots_pk_gen(const unsigned char* sk_seed, SHA256_CTX hash_ctx, unsigned char* adrs, uint32_t keypair, bool sf);
uint32_t wots_grind(const unsigned char* message, uint32_t message_len, SHA256_CTX hash_ctx, unsigned char* adrs, uint32_t keypair, unsigned char* msg_out, bool sf);
bool wots_digest(const unsigned char* message, uint32_t message_len, SHA256_CTX hash_ctx, uint32_t ctr, unsigned char* adrs, uint32_t keypair, unsigned char* msg_out, bool sf);
unsigned char* wots_sign(const unsigned char* message, uint32_t message_len, const unsigned char* sk_seed, const unsigned char* sk_prf, const unsigned char* pk_seed, const unsigned char* pk_root, SHA256_CTX hash_ctx, unsigned char* adrs, uint32_t keypair, bool sf, bool is_internal);
unsigned char* wots_pk_from_sig(const unsigned char* sig, const unsigned char* message, uint32_t message_len, const unsigned char* pk_root, SHA256_CTX hash_ctx, unsigned char* adrs, uint32_t keypair, bool sf, bool is_internal);
}
#endif