47 #define BLAKE3_MAX_INPUT_LEN_POWER 20
48 #define BLAKE3_MAX_INPUT_LEN (1 << BLAKE3_MAX_INPUT_LEN_POWER)
50 #define BLAKE3_BLOCK_LEN 64
51 #define BLAKE3_OUT_LEN 32
52 #define BLAKE3_MAX_DEPTH (BLAKE3_MAX_INPUT_LEN_POWER - 10)
53 #define BLAKE3_MAX_STACK_SIZE (BLAKE3_MAX_DEPTH + 1) * BLAKE3_OUT_LEN
54 #define BLAKE3_WORD_SIZE 32
55 #define BLAKE3_NB_OF_WORDS 8
61 uint32_t cv[BLAKE3_NB_OF_WORDS];
63 uint8_t buffer[BLAKE3_BLOCK_LEN];
73 uint32_t key[BLAKE3_NB_OF_WORDS];
76 uint8_t cv_stack[BLAKE3_MAX_STACK_SIZE];
82 cx_blake3_state_t chunk;
104 WARN_UNUSED_RESULT cx_err_t cx_blake3_init(cx_blake3_t *hash,
106 const unsigned char *key,
108 unsigned int context_len);
127 WARN_UNUSED_RESULT cx_err_t cx_blake3(cx_blake3_t *hash,
145 WARN_UNUSED_RESULT cx_err_t cx_blake3_update(cx_blake3_t *hash,
160 WARN_UNUSED_RESULT cx_err_t cx_blake3_final(cx_blake3_t *hash,
uint8_t *output,
size_t out_len);