Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <blake2s.hpp>
Classes | |
struct | blake2s_state |
Static Public Member Functions | |
static byte_array_ct | hash (const byte_array_ct &input) |
Private Types | |
using | field_ct = field_t< Builder > |
using | byte_array_ct = byte_array< Builder > |
Static Private Member Functions | |
static void | increment_counter (blake2s_state &S, const uint32_t inc) |
static void | compress (blake2s_state &S, byte_array_ct const &in) |
static void | blake2s (blake2s_state &S, byte_array_ct const &in) |
Static Private Attributes | |
static constexpr uint32_t | blake2s_IV [8] |
static constexpr uint32_t | initial_H [8] |
static constexpr size_t | BLAKE2S_STATE_SIZE = stdlib::blake_util::BLAKE_STATE_SIZE |
static constexpr uint32_t | BLAKE2S_BLOCKBYTES = 64 |
Definition at line 16 of file blake2s.hpp.
|
private |
Definition at line 18 of file blake2s.hpp.
|
private |
Definition at line 17 of file blake2s.hpp.
|
staticprivate |
Definition at line 98 of file blake2s.cpp.
|
staticprivate |
Definition at line 49 of file blake2s.cpp.
|
static |
Definition at line 122 of file blake2s.cpp.
|
staticprivate |
The blake2s_state consists of the following components: h: A 64-byte chain value denoted decomposed as (h_0, h_1, ..., h_7), each h_i is a 32-bit number. It form the first two rows on the internal state matrix v of the compression function G.
t: It is a counter (t_0 lsb and t_1 msb) used in the initialization of the internal state v.
f: f_0 and f_1 are finalization flags used in the initialization of the internal state v. / 0xfff...ff if the block processed is the last f_0 = | \ 0x000...00 otherwise / 0xfff...ff if the last node is processed in merkle-tree hashing f_1 = | \ 0x000...00 otherwise
Further, the internal state 4x4 matrix used by the compression function is denoted by v. The input data is stored in the 16-word message m.
Definition at line 40 of file blake2s.cpp.
|
staticconstexprprivate |
Definition at line 28 of file blake2s.hpp.
|
staticconstexprprivate |
Definition at line 20 of file blake2s.hpp.
|
staticconstexprprivate |
Definition at line 27 of file blake2s.hpp.
|
staticconstexprprivate |
Definition at line 23 of file blake2s.hpp.