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.

33 lines
1.2 KiB

  1. #ifndef XMSS_WOTS_H
  2. #define XMSS_WOTS_H
  3. #include <stdint.h>
  4. #include "params.h"
  5. /**
  6. * WOTS key generation. Takes a 32byte seed for the secret key, expands it to a full WOTS secret key and computes the corresponding public key.
  7. * For this it takes the seed pub_seed which is used to generate bitmasks and hash keys and the address of this WOTS key pair addr
  8. *
  9. * Places the computed public key at address pk.
  10. */
  11. void wots_pkgen(const xmss_params *params,
  12. unsigned char *pk, const unsigned char *sk,
  13. const unsigned char *pub_seed, uint32_t addr[8]);
  14. /**
  15. * Takes a m-byte message and the 32-byte seed for the secret key to compute a signature that is placed at "sig".
  16. */
  17. void wots_sign(const xmss_params *params,
  18. unsigned char *sig, const unsigned char *msg,
  19. const unsigned char *sk, const unsigned char *pub_seed,
  20. uint32_t addr[8]);
  21. /**
  22. * Takes a WOTS signature, a m-byte message and computes a WOTS public key that it places at pk.
  23. */
  24. void wots_pk_from_sig(const xmss_params *params, unsigned char *pk,
  25. const unsigned char *sig, const unsigned char *msg,
  26. const unsigned char *pub_seed, uint32_t addr[8]);
  27. #endif