1 #ifndef PQCLEAN_SPHINCSSHAKE256256SSIMPLE_CLEAN_FORS_H
2 #define PQCLEAN_SPHINCSSHAKE256256SSIMPLE_CLEAN_FORS_H
3 
4 #include <stdint.h>
5 
6 #include "hash_state.h"
7 #include "params.h"
8 
9 /**
10  * Signs a message m, deriving the secret key from sk_seed and the FTS address.
11  * Assumes m contains at least PQCLEAN_SPHINCSSHAKE256256SSIMPLE_CLEAN_FORS_HEIGHT * PQCLEAN_SPHINCSSHAKE256256SSIMPLE_CLEAN_FORS_TREES bits.
12  */
13 void PQCLEAN_SPHINCSSHAKE256256SSIMPLE_CLEAN_fors_sign(
14     unsigned char *sig, unsigned char *pk,
15     const unsigned char *m,
16     const unsigned char *sk_seed, const unsigned char *pub_seed,
17     const uint32_t fors_addr[8], const hash_state *hash_state_seeded);
18 
19 /**
20  * Derives the FORS public key from a signature.
21  * This can be used for verification by comparing to a known public key, or to
22  * subsequently verify a signature on the derived public key. The latter is the
23  * typical use-case when used as an FTS below an OTS in a hypertree.
24  * Assumes m contains at least PQCLEAN_SPHINCSSHAKE256256SSIMPLE_CLEAN_FORS_HEIGHT * PQCLEAN_SPHINCSSHAKE256256SSIMPLE_CLEAN_FORS_TREES bits.
25  */
26 void PQCLEAN_SPHINCSSHAKE256256SSIMPLE_CLEAN_fors_pk_from_sig(
27     unsigned char *pk,
28     const unsigned char *sig, const unsigned char *m,
29     const unsigned char *pub_seed, const uint32_t fors_addr[8],
30     const hash_state *hash_state_seeded);
31 
32 #endif
33