30 const size_t byte_len = input.
size();
32 for (
size_t i = 0; i < byte_len; i += num_bytes_in_chunk) {
34 result.emplace_back(
static_cast<field_ct>(chunk));
49 for (
auto& elem : vector) {
56 for (
size_t idx = 0; idx < input.
size(); idx++) {
57 input[idx].fix_witness();
70TEST(boomerang_stdlib_sha256, test_graph_for_sha256_55_bytes)
85 EXPECT_EQ(connected_components.size(), 1);
87 EXPECT_EQ(variables_in_one_gate.size(), 0);
103HEAVY_TEST(boomerang_stdlib_sha256, test_graph_for_sha256_NIST_vector_five)
109 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
110 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
111 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
112 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
113 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
114 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
115 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
116 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
117 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
129 EXPECT_EQ(variables_in_one_gate.size(), 0);
130 EXPECT_EQ(connected_components.size(), 1);
143TEST(boomerang_stdlib_sha256, test_graph_for_sha256_NIST_vector_one)
152 EXPECT_EQ(connected_components.size(), 1);
154 EXPECT_EQ(variables_in_one_gate.size(), 0);
163TEST(boomerang_stdlib_sha256, test_graph_for_sha256_NIST_vector_two)
172 EXPECT_EQ(connected_components.size(), 1);
174 EXPECT_EQ(variables_in_one_gate.size(), 0);
183TEST(boomerang_stdlib_sha256, test_graph_for_sha256_NIST_vector_three)
194 EXPECT_EQ(connected_components.size(), 1);
196 EXPECT_EQ(variables_in_one_gate.size(), 0);
205TEST(boomerang_stdlib_sha256, test_graph_for_sha256_NIST_vector_four)
216 EXPECT_EQ(connected_components.size(), 1);
218 EXPECT_EQ(variables_in_one_gate.size(), 0);
static byte_array< Builder > hash(const byte_array_ct &input)
Represents a dynamic array of bytes in-circuit.
byte_array slice(size_t offset) const
Slice bytes from the byte array starting at offset. Does not add any constraints.
std::unordered_set< uint32_t > show_variables_in_one_gate(bb::UltraCircuitBuilder &ultra_circuit_builder)
this method returns a final set of variables that were in one gate
std::vector< std::vector< uint32_t > > find_connected_components()
this methond finds all connected components in the graph described by adjacency lists
void fix_vector(std::vector< field_ct > &vector)
void fix_byte_array(byte_array_ct &input)
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...
TEST(boomerang_stdlib_sha256, test_graph_for_sha256_55_bytes)
Test for SHA256 circuit graph analysis.
UltraCircuitBuilder Builder
Entry point for Barretenberg command-line interface.
UltraCircuitBuilder_< UltraExecutionTraceBlocks > UltraCircuitBuilder
StaticAnalyzer_< bb::fr > StaticAnalyzer
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept