9#include "../../primitives/byte_array/byte_array.hpp"
10#include "../../primitives/field/field.hpp"
14template <
typename Builder>
class Blake3s {
21#define BLAKE3_VERSION_STRING "0.3.7"
37 static constexpr std::array<uint32_t, 8>
IV{ 0x6A09E667UL, 0xBB67AE85UL, 0x3C6EF372UL, 0xA54FF53AUL,
38 0x510E527FUL, 0x9B05688CUL, 0x1F83D9ABUL, 0x5BE0CD19UL };
static void hasher_init(blake3_hasher *self)
static byte_array_ct hash(const byte_array_ct &input)
static void compress_in_place(field_t< Builder > cv[8], const byte_array_ct &block, uint8_t block_len, uint8_t flags)
static void compress_xof(const field_t< Builder > cv[8], const byte_array_ct &block, uint8_t block_len, uint8_t flags, byte_array_ct &out)
static constexpr size_t BLAKE3_STATE_SIZE
static void compress_pre(field_t< Builder > state[BLAKE3_STATE_SIZE], const field_t< Builder > cv[8], const byte_array_ct &block, uint8_t block_len, uint8_t flags)
static constexpr std::array< uint32_t, 8 > IV
static void hasher_finalize(const blake3_hasher *self, byte_array_ct &out)
static uint8_t maybe_start_flag(const blake3_hasher *self)
static output_t make_output(const field_t< Builder > input_cv[8], 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.
byte_array< Builder > buf
field_t< Builder > key[8]
uint8_t blocks_compressed
byte_array< Builder > block
field_t< Builder > input_cv[8]