summaryrefslogtreecommitdiff
path: root/lib/liboqs/src/sig/sphincs/pqclean_sphincs-sha256-128f-simple_clean/hash.h
blob: 1e6eef650eae197b1b4be103491344748c7379af (plain)
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 PQCLEAN_SPHINCSSHA256128FSIMPLE_CLEAN_HASH_H
#define PQCLEAN_SPHINCSSHA256128FSIMPLE_CLEAN_HASH_H

#include "hash_state.h"

#include <stddef.h>
#include <stdint.h>

void PQCLEAN_SPHINCSSHA256128FSIMPLE_CLEAN_initialize_hash_function(
    hash_state *hash_state_seeded,
    const unsigned char *pub_seed, const unsigned char *sk_seed);

void PQCLEAN_SPHINCSSHA256128FSIMPLE_CLEAN_destroy_hash_function(hash_state *hash_state_seeded);

void PQCLEAN_SPHINCSSHA256128FSIMPLE_CLEAN_prf_addr(
    unsigned char *out, const unsigned char *key, const uint32_t addr[8],
    const hash_state *hash_state_seeded);

void PQCLEAN_SPHINCSSHA256128FSIMPLE_CLEAN_gen_message_random(
    unsigned char *R,
    const unsigned char *sk_prf, const unsigned char *optrand,
    const unsigned char *m, size_t mlen,
    const hash_state *hash_state_seeded);

void PQCLEAN_SPHINCSSHA256128FSIMPLE_CLEAN_hash_message(
    unsigned char *digest, uint64_t *tree, uint32_t *leaf_idx,
    const unsigned char *R, const unsigned char *pk,
    const unsigned char *m, size_t mlen,
    const hash_state *hash_state_seeded);

#endif