Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

34 řádky
1.1 KiB

  1. /*
  2. wots.h version 20160722
  3. Andreas Hülsing
  4. Joost Rijneveld
  5. Public domain.
  6. */
  7. #ifndef WOTS_H
  8. #define WOTS_H
  9. #include <stdint.h>
  10. /**
  11. * 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.
  12. * 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
  13. *
  14. * Places the computed public key at address pk.
  15. */
  16. void wots_pkgen(unsigned char *pk, const unsigned char *sk, const unsigned char *pub_seed, uint32_t addr[8]);
  17. /**
  18. * Takes a m-byte message and the 32-byte seed for the secret key to compute a signature that is placed at "sig".
  19. *
  20. */
  21. void wots_sign(unsigned char *sig, const unsigned char *msg, const unsigned char *sk, const unsigned char *pub_seed, uint32_t addr[8]);
  22. /**
  23. * Takes a WOTS signature, a m-byte message and computes a WOTS public key that it places at pk.
  24. *
  25. */
  26. void wots_pkFromSig(unsigned char *pk, const unsigned char *sig, const unsigned char *msg, const unsigned char *pub_seed, uint32_t addr[8]);
  27. #endif