LLVM 20.0.0git
|
Go to the source code of this file.
Classes | |
struct | output_t |
|
static |
Definition at line 269 of file blake3.c.
References BLAKE3_CHUNK_LEN, blake3_compress_subtree_wide(), BLAKE3_OUT_LEN, blake3_simd_degree, compress_chunks_parallel(), compress_parents_parallel(), left_len(), and MAX_SIMD_DEGREE_OR_2.
Referenced by blake3_compress_subtree_wide(), and compress_subtree_to_parent_node().
INLINE size_t chunk_state_fill_buf | ( | blake3_chunk_state * | self, |
const uint8_t * | input, | ||
size_t | input_len | ||
) |
Definition at line 41 of file blake3.c.
References BLAKE3_BLOCK_LEN.
Referenced by chunk_state_update().
INLINE void chunk_state_init | ( | blake3_chunk_state * | self, |
const uint32_t | key[8], | ||
uint8_t | flags | ||
) |
Definition at line 17 of file blake3.c.
References BLAKE3_BLOCK_LEN, and BLAKE3_KEY_LEN.
Referenced by compress_chunks_parallel(), hasher_init_base(), and llvm_blake3_hasher_update().
INLINE size_t chunk_state_len | ( | const blake3_chunk_state * | self | ) |
Definition at line 36 of file blake3.c.
References BLAKE3_BLOCK_LEN.
Referenced by llvm_blake3_hasher_finalize_seek(), and llvm_blake3_hasher_update().
INLINE uint8_t chunk_state_maybe_start_flag | ( | const blake3_chunk_state * | self | ) |
Definition at line 53 of file blake3.c.
References CHUNK_START.
Referenced by chunk_state_output(), and chunk_state_update().
INLINE output_t chunk_state_output | ( | const blake3_chunk_state * | self | ) |
Definition at line 147 of file blake3.c.
References CHUNK_END, chunk_state_maybe_start_flag(), and make_output().
Referenced by compress_chunks_parallel(), llvm_blake3_hasher_finalize_seek(), and llvm_blake3_hasher_update().
INLINE void chunk_state_reset | ( | blake3_chunk_state * | self, |
const uint32_t | key[8], | ||
uint64_t | chunk_counter | ||
) |
Definition at line 27 of file blake3.c.
References BLAKE3_BLOCK_LEN, and BLAKE3_KEY_LEN.
Referenced by llvm_blake3_hasher_reset(), and llvm_blake3_hasher_update().
INLINE void chunk_state_update | ( | blake3_chunk_state * | self, |
const uint8_t * | input, | ||
size_t | input_len | ||
) |
Definition at line 119 of file blake3.c.
References BLAKE3_BLOCK_LEN, blake3_compress_in_place, chunk_state_fill_buf(), and chunk_state_maybe_start_flag().
Referenced by compress_chunks_parallel(), and llvm_blake3_hasher_update().
INLINE size_t compress_chunks_parallel | ( | const uint8_t * | input, |
size_t | input_len, | ||
const uint32_t | key[8], | ||
uint64_t | chunk_counter, | ||
uint8_t | flags, | ||
uint8_t * | out | ||
) |
Definition at line 173 of file blake3.c.
References assert(), BLAKE3_BLOCK_LEN, BLAKE3_CHUNK_LEN, blake3_chunk_state, blake3_hash_many, BLAKE3_OUT_LEN, CHUNK_END, CHUNK_START, chunk_state_init(), chunk_state_output(), chunk_state_update(), MAX_SIMD_DEGREE, and output_chaining_value().
Referenced by blake3_compress_subtree_wide().
INLINE size_t compress_parents_parallel | ( | const uint8_t * | child_chaining_values, |
size_t | num_chaining_values, | ||
const uint32_t | key[8], | ||
uint8_t | flags, | ||
uint8_t * | out | ||
) |
Definition at line 217 of file blake3.c.
References assert(), blake3_hash_many, BLAKE3_OUT_LEN, MAX_SIMD_DEGREE_OR_2, and PARENT.
Referenced by blake3_compress_subtree_wide(), and compress_subtree_to_parent_node().
INLINE void compress_subtree_to_parent_node | ( | const uint8_t * | input, |
size_t | input_len, | ||
const uint32_t | key[8], | ||
uint64_t | chunk_counter, | ||
uint8_t | flags, | ||
uint8_t | out[2 *BLAKE3_OUT_LEN] | ||
) |
Definition at line 338 of file blake3.c.
References assert(), BLAKE3_CHUNK_LEN, blake3_compress_subtree_wide(), BLAKE3_OUT_LEN, compress_parents_parallel(), and MAX_SIMD_DEGREE_OR_2.
Referenced by llvm_blake3_hasher_update().
INLINE void hasher_init_base | ( | blake3_hasher * | self, |
const uint32_t | key[8], | ||
uint8_t | flags | ||
) |
Definition at line 367 of file blake3.c.
References BLAKE3_KEY_LEN, and chunk_state_init().
Referenced by llvm_blake3_hasher_init(), llvm_blake3_hasher_init_derive_key_raw(), and llvm_blake3_hasher_init_keyed().
INLINE void hasher_merge_cv_stack | ( | blake3_hasher * | self, |
uint64_t | total_len | ||
) |
Definition at line 409 of file blake3.c.
References BLAKE3_OUT_LEN, output_chaining_value(), parent_output(), and popcnt().
Referenced by hasher_push_cv(), and llvm_blake3_hasher_update().
INLINE void hasher_push_cv | ( | blake3_hasher * | self, |
uint8_t | new_cv[BLAKE3_OUT_LEN], | ||
uint64_t | chunk_counter | ||
) |
Definition at line 452 of file blake3.c.
References BLAKE3_OUT_LEN, and hasher_merge_cv_stack().
Referenced by llvm_blake3_hasher_update().
INLINE size_t left_len | ( | size_t | content_len | ) |
Definition at line 162 of file blake3.c.
References BLAKE3_CHUNK_LEN, and round_down_to_power_of_2().
Referenced by blake3_compress_subtree_wide().
void llvm_blake3_hasher_finalize | ( | const blake3_hasher * | self, |
uint8_t * | out, | ||
size_t | out_len | ||
) |
Definition at line 569 of file blake3.c.
References __msan_unpoison, and llvm_blake3_hasher_finalize_seek().
Referenced by llvm_blake3_hasher_init_derive_key_raw().
void llvm_blake3_hasher_finalize_seek | ( | const blake3_hasher * | self, |
uint64_t | seek, | ||
uint8_t * | out, | ||
size_t | out_len | ||
) |
Definition at line 578 of file blake3.c.
References BLAKE3_BLOCK_LEN, chunk_state_len(), chunk_state_output(), output_chaining_value(), output_root_bytes(), and parent_output().
Referenced by llvm_blake3_hasher_finalize().
void llvm_blake3_hasher_init | ( | blake3_hasher * | self | ) |
Definition at line 374 of file blake3.c.
References hasher_init_base(), and IV.
void llvm_blake3_hasher_init_derive_key | ( | blake3_hasher * | self, |
const char * | context | ||
) |
Definition at line 395 of file blake3.c.
References llvm_blake3_hasher_init_derive_key_raw().
void llvm_blake3_hasher_init_derive_key_raw | ( | blake3_hasher * | self, |
const void * | context, | ||
size_t | context_len | ||
) |
Definition at line 383 of file blake3.c.
References blake3_hasher, BLAKE3_KEY_LEN, DERIVE_KEY_CONTEXT, DERIVE_KEY_MATERIAL, hasher_init_base(), IV, llvm_blake3_hasher_finalize(), llvm_blake3_hasher_update(), and load_key_words().
Referenced by llvm_blake3_hasher_init_derive_key().
void llvm_blake3_hasher_init_keyed | ( | blake3_hasher * | self, |
const uint8_t | key[BLAKE3_KEY_LEN] | ||
) |
Definition at line 376 of file blake3.c.
References hasher_init_base(), KEYED_HASH, and load_key_words().
void llvm_blake3_hasher_reset | ( | blake3_hasher * | self | ) |
Definition at line 622 of file blake3.c.
References chunk_state_reset().
void llvm_blake3_hasher_update | ( | blake3_hasher * | self, |
const void * | input, | ||
size_t | input_len | ||
) |
Definition at line 460 of file blake3.c.
References BLAKE3_CHUNK_LEN, blake3_chunk_state, BLAKE3_OUT_LEN, chunk_state_init(), chunk_state_len(), chunk_state_output(), chunk_state_reset(), chunk_state_update(), compress_subtree_to_parent_node(), hasher_merge_cv_stack(), hasher_push_cv(), output_chaining_value(), and round_down_to_power_of_2().
Referenced by llvm_blake3_hasher_init_derive_key_raw().
Definition at line 15 of file blake3.c.
References BLAKE3_VERSION_STRING.
INLINE output_t make_output | ( | const uint32_t | input_cv[8], |
const uint8_t | block[BLAKE3_BLOCK_LEN], | ||
uint8_t | block_len, | ||
uint64_t | counter, | ||
uint8_t | flags | ||
) |
Definition at line 69 of file blake3.c.
References BLAKE3_BLOCK_LEN, output_t::block, block, output_t::block_len, output_t::counter, output_t::flags, and output_t::input_cv.
Referenced by chunk_state_output(), and parent_output().
Definition at line 88 of file blake3.c.
References blake3_compress_in_place, output_t::block, output_t::block_len, output_t::counter, output_t::flags, output_t::input_cv, and store_cv_words().
Referenced by compress_chunks_parallel(), hasher_merge_cv_stack(), llvm_blake3_hasher_finalize_seek(), and llvm_blake3_hasher_update().
INLINE void output_root_bytes | ( | const output_t * | self, |
uint64_t | seek, | ||
uint8_t * | out, | ||
size_t | out_len | ||
) |
Definition at line 96 of file blake3.c.
References blake3_compress_xof, output_t::block, output_t::block_len, output_t::flags, output_t::input_cv, and ROOT.
Referenced by llvm_blake3_hasher_finalize_seek().
INLINE output_t parent_output | ( | const uint8_t | block[BLAKE3_BLOCK_LEN], |
const uint32_t | key[8], | ||
uint8_t | flags | ||
) |
Definition at line 154 of file blake3.c.
References BLAKE3_BLOCK_LEN, block, make_output(), and PARENT.
Referenced by hasher_merge_cv_stack(), and llvm_blake3_hasher_finalize_seek().