1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-30 03:11:43 +00:00
pqcrypto/crypto_sign/sphincs-sha256-192f-simple/avx2/hash.h
Thom Wiggers facb527c7c SPHINCS+ optimized implementations (#253)
* Add state destroy to SHA2 API

* Include optimized SPHINCS+ implementations

I've generated new implementations from the sphincsplus repository.

* Don't destroy sha256ctx after finalize

* Attempt to shut up MSVC

* Make sure to drop errors in rmtree
2021-03-24 21:02:45 +00:00

32 lines
1.1 KiB
C

#ifndef PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_HASH_H
#define PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_HASH_H
#include "hash_state.h"
#include <stddef.h>
#include <stdint.h>
void PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_initialize_hash_function(
hash_state *hash_state_seeded,
const unsigned char *pub_seed, const unsigned char *sk_seed);
void PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_destroy_hash_function(hash_state *hash_state_seeded);
void PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_prf_addr(
unsigned char *out, const unsigned char *key, const uint32_t addr[8],
const hash_state *hash_state_seeded);
void PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_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_SPHINCSSHA256192FSIMPLE_AVX2_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