Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include "barretenberg/crypto/sha256/sha256.hpp"
#include "barretenberg/circuit_checker/circuit_checker.hpp"
#include "barretenberg/common/test.hpp"
#include "barretenberg/stdlib_circuit_builders/plookup_tables/plookup_tables.hpp"
#include "barretenberg/stdlib_circuit_builders/ultra_circuit_builder.hpp"
#include "sha256.hpp"
#include "barretenberg/numeric/bitop/rotate.hpp"
#include "barretenberg/numeric/bitop/sparse_form.hpp"
#include "barretenberg/numeric/random/engine.hpp"
Go to the source code of this file.
Typedefs | |
using | Builder = UltraCircuitBuilder |
using | byte_array_ct = byte_array< Builder > |
using | field_ct = field_t< Builder > |
using | witness_ct = witness_t< Builder > |
Functions | |
std::vector< field_ct > | pack_bytes_into_field_elements (const byte_array_ct &input, size_t num_bytes_in_chunk=4) |
Given a byte_array object, slice it into chunks of size num_bytes_in_chunk and compute field elements reconstructed from these chunks. | |
constexpr uint64_t | ror (uint64_t val, uint64_t shift) |
std::array< uint64_t, 64 > | extend_witness (std::array< uint64_t, 16 > &in) |
std::array< uint64_t, 8 > | inner_block (std::array< uint64_t, 64 > &w) |
TEST (stdlib_sha256, test_plookup_55_bytes) | |
TEST (stdlib_sha256, test_55_bytes) | |
TEST (stdlib_sha256, test_NIST_vector_one_byte_array) | |
TEST (stdlib_sha256, test_NIST_vector_one) | |
TEST (stdlib_sha256, test_NIST_vector_two) | |
TEST (stdlib_sha256, test_NIST_vector_three) | |
TEST (stdlib_sha256, test_NIST_vector_four) | |
HEAVY_TEST (stdlib_sha256, test_NIST_vector_five) | |
TEST (stdlib_sha256, test_input_len_multiple) | |
TEST (stdlib_sha256, test_input_str_len_multiple) | |
TEST (stdlib_sha256, test_boomerang_value_regression) | |
using Builder = UltraCircuitBuilder |
Definition at line 18 of file sha256.test.cpp.
using byte_array_ct = byte_array<Builder> |
Definition at line 20 of file sha256.test.cpp.
Definition at line 21 of file sha256.test.cpp.
using witness_ct = witness_t<Builder> |
Definition at line 22 of file sha256.test.cpp.
std::array< uint64_t, 64 > extend_witness | ( | std::array< uint64_t, 16 > & | in | ) |
Definition at line 46 of file sha256.test.cpp.
HEAVY_TEST | ( | stdlib_sha256 | , |
test_NIST_vector_five | |||
) |
Definition at line 336 of file sha256.test.cpp.
std::array< uint64_t, 8 > inner_block | ( | std::array< uint64_t, 64 > & | w | ) |
Add into previous block output and return
Definition at line 73 of file sha256.test.cpp.
std::vector< field_ct > pack_bytes_into_field_elements | ( | const byte_array_ct & | input, |
size_t | num_bytes_in_chunk = 4 |
||
) |
Given a byte_array
object, slice it into chunks of size num_bytes_in_chunk
and compute field elements reconstructed from these chunks.
Definition at line 29 of file sha256.test.cpp.
|
constexpr |
Definition at line 41 of file sha256.test.cpp.
TEST | ( | stdlib_sha256 | , |
test_55_bytes | |||
) |
Definition at line 189 of file sha256.test.cpp.
TEST | ( | stdlib_sha256 | , |
test_boomerang_value_regression | |||
) |
Definition at line 437 of file sha256.test.cpp.
TEST | ( | stdlib_sha256 | , |
test_input_len_multiple | |||
) |
Definition at line 373 of file sha256.test.cpp.
TEST | ( | stdlib_sha256 | , |
test_input_str_len_multiple | |||
) |
Definition at line 393 of file sha256.test.cpp.
TEST | ( | stdlib_sha256 | , |
test_NIST_vector_four | |||
) |
Definition at line 310 of file sha256.test.cpp.
TEST | ( | stdlib_sha256 | , |
test_NIST_vector_one | |||
) |
Definition at line 236 of file sha256.test.cpp.
TEST | ( | stdlib_sha256 | , |
test_NIST_vector_one_byte_array | |||
) |
Definition at line 214 of file sha256.test.cpp.
TEST | ( | stdlib_sha256 | , |
test_NIST_vector_three | |||
) |
Definition at line 285 of file sha256.test.cpp.
TEST | ( | stdlib_sha256 | , |
test_NIST_vector_two | |||
) |
Definition at line 261 of file sha256.test.cpp.
TEST | ( | stdlib_sha256 | , |
test_plookup_55_bytes | |||
) |
Definition at line 163 of file sha256.test.cpp.