9#include "../../primitives/byte_array/byte_array.hpp"
10#include "../../primitives/field/field.hpp"
14template <
typename Builder>
class Blake3s {
38 static constexpr std::array<uint32_t, 8>
IV{ 0x6A09E667UL, 0xBB67AE85UL, 0x3C6EF372UL, 0xA54FF53AUL,
39 0x510E527FUL, 0x9B05688CUL, 0x1F83D9ABUL, 0x5BE0CD19UL };
static constexpr size_t BLAKE3_CV_WORDS
static void hasher_init(blake3_hasher *self)
static output_t make_output(const field_ct input_cv[BLAKE3_CV_WORDS], const byte_array_ct &block, uint8_t block_len, uint8_t flags)
static byte_array_ct hash(const byte_array_ct &input)
static void compress_in_place(field_ct cv[BLAKE3_CV_WORDS], const byte_array_ct &block, uint8_t block_len, uint8_t flags)
static constexpr size_t BLAKE3_STATE_SIZE
static constexpr std::array< uint32_t, 8 > IV
static void hasher_finalize(const blake3_hasher *self, byte_array_ct &out)
static void compress_xof(const field_ct cv[BLAKE3_CV_WORDS], const byte_array_ct &block, uint8_t block_len, uint8_t flags, byte_array_ct &out)
static uint8_t maybe_start_flag(const blake3_hasher *self)
static void compress_pre(field_ct state[BLAKE3_STATE_SIZE], const field_ct cv[BLAKE3_CV_WORDS], const byte_array_ct &block, uint8_t block_len, uint8_t flags)
static void hasher_update(blake3_hasher *self, const byte_array_ct &input, size_t input_len)
Represents a dynamic array of bytes in-circuit.
field_ct cv[BLAKE3_CV_WORDS]
uint8_t blocks_compressed
field_ct key[BLAKE3_CV_WORDS]
field_ct input_cv[BLAKE3_CV_WORDS]