Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

wots.h 1.2 KiB

il y a 9 ans
il y a 9 ans
il y a 9 ans
il y a 9 ans
il y a 9 ans
il y a 9 ans
il y a 9 ans
il y a 9 ans
12345678910111213141516171819202122232425262728293031323334353637
  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 32 byte seed for the private key, expands it to
  7. * a full WOTS private key and computes the corresponding public key.
  8. * It requires the seed pub_seed (used to generate bitmasks and hash keys)
  9. * and the address of this WOTS key pair.
  10. *
  11. * Writes the computed public key to 'pk'.
  12. */
  13. void wots_pkgen(const xmss_params *params,
  14. unsigned char *pk, const unsigned char *seed,
  15. const unsigned char *pub_seed, uint32_t addr[8]);
  16. /**
  17. * Takes a n-byte message and the 32-byte seed for the private key to compute a
  18. * signature that is placed at 'sig'.
  19. */
  20. void wots_sign(const xmss_params *params,
  21. unsigned char *sig, const unsigned char *msg,
  22. const unsigned char *seed, const unsigned char *pub_seed,
  23. uint32_t addr[8]);
  24. /**
  25. * Takes a WOTS signature and an n-byte message, computes a WOTS public key.
  26. *
  27. * Writes the computed public key to 'pk'.
  28. */
  29. void wots_pk_from_sig(const xmss_params *params, unsigned char *pk,
  30. const unsigned char *sig, const unsigned char *msg,
  31. const unsigned char *pub_seed, uint32_t addr[8]);
  32. #endif