Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

42 rader
1.4 KiB

  1. #ifndef PQCLEAN_SPHINCSSHA256256FSIMPLE_AVX2_WOTS_H
  2. #define PQCLEAN_SPHINCSSHA256256FSIMPLE_AVX2_WOTS_H
  3. #include "hash_state.h"
  4. #include "params.h"
  5. #include <stdint.h>
  6. /**
  7. * WOTS key generation. Takes a 32 byte seed for the private key, expands it to
  8. * a full WOTS private key and computes the corresponding public key.
  9. * It requires the seed pub_seed (used to generate bitmasks and hash keys)
  10. * and the address of this WOTS key pair.
  11. *
  12. * Writes the computed public key to 'pk'.
  13. */
  14. void PQCLEAN_SPHINCSSHA256256FSIMPLE_AVX2_wots_gen_pk(
  15. unsigned char *pk, const unsigned char *sk_seed,
  16. const unsigned char *pub_seed, uint32_t addr[8],
  17. const hash_state *hash_state_seeded);
  18. /**
  19. * Takes a n-byte message and the 32-byte seed for the private key to compute a
  20. * signature that is placed at 'sig'.
  21. */
  22. void PQCLEAN_SPHINCSSHA256256FSIMPLE_AVX2_wots_sign(
  23. unsigned char *sig, const unsigned char *msg,
  24. const unsigned char *sk_seed, const unsigned char *pub_seed,
  25. uint32_t addr[8], const hash_state *hash_state_seeded);
  26. /**
  27. * Takes a WOTS signature and an n-byte message, computes a WOTS public key.
  28. *
  29. * Writes the computed public key to 'pk'.
  30. */
  31. void PQCLEAN_SPHINCSSHA256256FSIMPLE_AVX2_wots_pk_from_sig(
  32. unsigned char *pk,
  33. const unsigned char *sig, const unsigned char *msg,
  34. const unsigned char *pub_seed, uint32_t addr[8],
  35. const hash_state *hash_state_seeded);
  36. #endif