You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
901 B

  1. /*
  2. hash.h version 20160722
  3. Andreas Hülsing
  4. Joost Rijneveld
  5. Public domain.
  6. */
  7. #ifndef HASH_H
  8. #define HASH_H
  9. #define XMSS_SHA2 0x01
  10. #define XMSS_SHAKE 0x02
  11. #define IS_LITTLE_ENDIAN 1
  12. unsigned char* addr_to_byte(unsigned char *bytes, const uint32_t addr[8]);
  13. int prf(unsigned char *out, const unsigned char *in, const unsigned char *key, unsigned int keylen, const unsigned char hash_alg);
  14. int h_msg(unsigned char *out,const unsigned char *in,unsigned long long inlen, const unsigned char *key, const unsigned int keylen, const unsigned int n, const unsigned char hash_alg);
  15. int hash_h(unsigned char *out, const unsigned char *in, const unsigned char *pub_seed, uint32_t addr[8], const unsigned int n, const unsigned char hash_alg);
  16. int hash_f(unsigned char *out, const unsigned char *in, const unsigned char *pub_seed, uint32_t addr[8], const unsigned int n, const unsigned char hash_alg);
  17. #endif