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.

40 regels
1.0 KiB

  1. #ifndef PARAMS_H
  2. #define PARAMS_H
  3. #include <stdint.h>
  4. // These are merely internal identifiers for the supported hash functions
  5. #define XMSS_SHA2 0
  6. #define XMSS_SHAKE 1
  7. // This is a consequence of the OID definitions in the draft, used for parsing
  8. #define XMSS_OID_LEN 4
  9. // This structure will be populated when calling xmss[mt]_parse_oid
  10. typedef struct {
  11. unsigned int func;
  12. unsigned int n;
  13. unsigned int wots_w;
  14. unsigned int wots_log_w;
  15. unsigned int wots_len1;
  16. unsigned int wots_len2;
  17. unsigned int wots_len;
  18. unsigned int wots_keysize;
  19. unsigned int full_height;
  20. unsigned int tree_height;
  21. unsigned int d;
  22. unsigned int index_len;
  23. unsigned int bytes;
  24. unsigned int publickey_bytes;
  25. unsigned int privatekey_bytes;
  26. unsigned int bds_k;
  27. } xmss_params;
  28. int xmss_str_to_oid(uint32_t *oid, const char* s);
  29. int xmssmt_str_to_oid(uint32_t *oid, const char* s);
  30. int xmss_parse_oid(xmss_params *params, const uint32_t oid);
  31. int xmssmt_parse_oid(xmss_params *params, const uint32_t oid);
  32. #endif