您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

xmss_commons.h 1.3 KiB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef XMSS_COMMONS_H
  2. #define XMSS_COMMONS_H
  3. #include <stdint.h>
  4. #include "params.h"
  5. /**
  6. * Computes the leaf at a given address. First generates the WOTS key pair,
  7. * then computes leaf using l_tree. As this happens position independent, we
  8. * only require that addr encodes the right ltree-address.
  9. */
  10. void gen_leaf_wots(const xmss_params *params, unsigned char *leaf,
  11. const unsigned char *sk_seed, const unsigned char *pub_seed,
  12. uint32_t ltree_addr[8], uint32_t ots_addr[8]);
  13. /**
  14. * Verifies a given message signature pair under a given public key.
  15. * Note that this assumes a pk without an OID, i.e. [root || PUB_SEED]
  16. */
  17. int xmss_core_sign_open(const xmss_params *params,
  18. unsigned char *m, unsigned long long *mlen,
  19. const unsigned char *sm, unsigned long long smlen,
  20. const unsigned char *pk);
  21. /**
  22. * Verifies a given message signature pair under a given public key.
  23. * Note that this assumes a pk without an OID, i.e. [root || PUB_SEED]
  24. */
  25. int xmssmt_core_sign_open(const xmss_params *params,
  26. unsigned char *m, unsigned long long *mlen,
  27. const unsigned char *sm, unsigned long long smlen,
  28. const unsigned char *pk);
  29. #endif