No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

47 líneas
1.7 KiB

  1. #ifndef PQCLEAN_SPHINCSSHA256256FSIMPLE_AVX2_UTILSX8_H
  2. #define PQCLEAN_SPHINCSSHA256256FSIMPLE_AVX2_UTILSX8_H
  3. #include <stdint.h>
  4. #include "hash_state.h"
  5. #include "params.h"
  6. /**
  7. * For a given leaf index, computes the authentication path and the resulting
  8. * root node using Merkle's TreeHash algorithm.
  9. * Expects the layer and tree parts of the tree_addr to be set, as well as the
  10. * tree type (i.e. PQCLEAN_SPHINCSSHA256256FSIMPLE_AVX2_ADDR_TYPE_HASHTREE or PQCLEAN_SPHINCSSHA256256FSIMPLE_AVX2_ADDR_TYPE_FORSTREE).
  11. * Applies the offset idx_offset to indices before building addresses, so that
  12. * it is possible to continue counting indices across trees.
  13. */
  14. void PQCLEAN_SPHINCSSHA256256FSIMPLE_AVX2_treehashx8_FORS_HEIGHT(
  15. unsigned char *rootx8, unsigned char *auth_pathx8,
  16. const unsigned char *sk_seed, const unsigned char *pub_seed,
  17. const uint32_t leaf_idx[8], uint32_t idx_offset[8],
  18. void (*gen_leafx8)(
  19. unsigned char * /* leaf0 */,
  20. unsigned char * /* leaf1 */,
  21. unsigned char * /* leaf2 */,
  22. unsigned char * /* leaf3 */,
  23. unsigned char * /* leaf4 */,
  24. unsigned char * /* leaf5 */,
  25. unsigned char * /* leaf6 */,
  26. unsigned char * /* leaf7 */,
  27. const unsigned char * /* sk_seed */,
  28. const unsigned char * /* pub_seed */,
  29. uint32_t /* addr_idx0 */,
  30. uint32_t /* addr_idx1 */,
  31. uint32_t /* addr_idx2 */,
  32. uint32_t /* addr_idx3 */,
  33. uint32_t /* addr_idx4 */,
  34. uint32_t /* addr_idx5 */,
  35. uint32_t /* addr_idx6 */,
  36. uint32_t /* addr_idx7 */,
  37. const uint32_t[8] /* tree_addr */,
  38. const hash_state * /* state_seeded */),
  39. uint32_t tree_addrx8[8 * 8],
  40. const hash_state *state_seeded);
  41. #endif