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.

9 年之前
9 年之前
9 年之前
12345678910111213141516171819202122232425262728293031
  1. #ifndef XMSS_HASH_H
  2. #define XMSS_HASH_H
  3. #include <stdint.h>
  4. #include "params.h"
  5. void addr_to_bytes(unsigned char *bytes, const uint32_t addr[8]);
  6. int prf(const xmss_params *params,
  7. unsigned char *out, const unsigned char in[32],
  8. const unsigned char *key);
  9. int h_msg(const xmss_params *params,
  10. unsigned char *out,
  11. const unsigned char *in, unsigned long long inlen,
  12. const unsigned char *key, const unsigned int keylen);
  13. int thash_h(const xmss_params *params,
  14. unsigned char *out, const unsigned char *in,
  15. const unsigned char *pub_seed, uint32_t addr[8]);
  16. int thash_f(const xmss_params *params,
  17. unsigned char *out, const unsigned char *in,
  18. const unsigned char *pub_seed, uint32_t addr[8]);
  19. int hash_message(const xmss_params *params, unsigned char *out,
  20. const unsigned char *R, const unsigned char *root,
  21. unsigned long long idx,
  22. unsigned char *m_with_prefix, unsigned long long mlen);
  23. #endif