forked from XMSS/xmss-reference
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpots.h
36 lines (30 loc) · 1.08 KB
/
pots.h
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
32
33
34
35
36
#ifndef XMSS_POTS_H
#define XMSS_POTS_H
#include <stdint.h>
#include "params.h"
/**
* POTS key generation. Takes a 32 byte seed for the private key, expands it to
* a full POTS private key and computes the corresponding public key.
*
* Writes the computed public key to 'pk'.
*/
void pots_pkgen(const xmss_params *params, unsigned char *sk,
unsigned char *pk, const unsigned char *seed,
const unsigned char *pub_seed, uint32_t addr[8]);
/**
* Takes a n-byte message and the 32-byte seed for the private key to compute a
* signature that is placed at 'sig'.
*/
void pots_sign(const xmss_params *params,
unsigned char *sig, const unsigned char *msg,
const unsigned char *seed, const unsigned char *pub_seed,
uint32_t addr[8]);
/**
* Takes a POTS signature, an n-byte message, and a POTS public key.
*
* Verifies the correctness of the signature.
*/
int pots_ver(const xmss_params *params,
const unsigned char *sig, const unsigned char *msg,
const unsigned char *pk);
#endif