|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include "barretenberg/boomerang_value_detection/graph.hpp"#include "barretenberg/circuit_checker/circuit_checker.hpp"#include "barretenberg/common/test.hpp"#include "barretenberg/stdlib/hash/sha256/sha256.hpp"#include "barretenberg/stdlib_circuit_builders/ultra_circuit_builder.hpp"Go to the source code of this file.
Typedefs | |
| using | Builder = UltraCircuitBuilder |
| using | field_ct = field_t< Builder > |
| using | witness_ct = witness_t< Builder > |
Functions | |
| template<size_t N> | |
| void | fix_field_array (std::array< field_ct, N > &arr) |
| Fix witness for an array of field elements. | |
| TEST (boomerang_stdlib_sha256, test_graph_for_sha256_block_single) | |
| Test SHA256 compression circuit graph analysis (single block) | |
| TEST (boomerang_stdlib_sha256, test_graph_for_sha256_block_chained) | |
| Test SHA256 compression circuit graph analysis (chained blocks) | |
| using Builder = UltraCircuitBuilder |
Definition at line 11 of file graph_description_sha256.test.cpp.
Definition at line 12 of file graph_description_sha256.test.cpp.
| using witness_ct = witness_t<Builder> |
Definition at line 13 of file graph_description_sha256.test.cpp.
| void fix_field_array | ( | std::array< field_ct, N > & | arr | ) |
Fix witness for an array of field elements.
Static analyzer prints variables that only appear in one gate. By fixing witnesses, we ensure variables appear in at least 2 gates, filtering out false positives.
Definition at line 21 of file graph_description_sha256.test.cpp.
| TEST | ( | boomerang_stdlib_sha256 | , |
| test_graph_for_sha256_block_chained | |||
| ) |
Test SHA256 compression circuit graph analysis (chained blocks)
This test verifies the graph structure when multiple sha256_block calls are chained together, simulating multi-block message hashing.
The test checks that:
Definition at line 80 of file graph_description_sha256.test.cpp.
| TEST | ( | boomerang_stdlib_sha256 | , |
| test_graph_for_sha256_block_single | |||
| ) |
Test SHA256 compression circuit graph analysis (single block)
This test verifies the graph structure of a sha256_block circuit. The test checks that:
Definition at line 36 of file graph_description_sha256.test.cpp.