Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include "barretenberg/boomerang_value_detection/graph.hpp"
#include "barretenberg/common/test.hpp"
#include "barretenberg/crypto/aes128/aes128.hpp"
#include "barretenberg/crypto/generators/generator_data.hpp"
#include "barretenberg/crypto/pedersen_commitment/pedersen.hpp"
#include "barretenberg/stdlib/encryption/aes128/aes128.hpp"
#include "barretenberg/stdlib_circuit_builders/mock_circuits.hpp"
#include "barretenberg/stdlib_circuit_builders/plookup_tables/fixed_base/fixed_base.hpp"
#include "barretenberg/stdlib_circuit_builders/ultra_circuit_builder.hpp"
#include <gtest/gtest.h>
Go to the source code of this file.
Typedefs | |
using | Builder = UltraCircuitBuilder |
using | field_pt = stdlib::field_t< UltraCircuitBuilder > |
using | witness_pt = stdlib::witness_t< bb::UltraCircuitBuilder > |
Functions | |
void | fix_vector_witness (std::vector< field_pt > &input_vector) |
Fix witness values in a vector to ensure they appear in multiple gates. | |
TEST (boomerang_stdlib_aes, test_graph_for_aes_64_bytes) | |
Test graph description of AES128CBC circuit with 64 bytes of data. | |
TEST (boomerang_stdlib_aes, test_variable_gates_count_for_aes128cbc) | |
Test variable gate counts for AES128CBC circuit. | |
using Builder = UltraCircuitBuilder |
Definition at line 17 of file graph_description_aes128.test.cpp.
using field_pt = stdlib::field_t<UltraCircuitBuilder> |
Definition at line 18 of file graph_description_aes128.test.cpp.
Definition at line 19 of file graph_description_aes128.test.cpp.
void fix_vector_witness | ( | std::vector< field_pt > & | input_vector | ) |
Fix witness values in a vector to ensure they appear in multiple gates.
Static analyzer typically identifies variables in only one gate. For test input/output variables, we can filter them by fixing their witness values, which adds them to a second gate and prevents them from being flagged as potentially dangerous.
input_vector | Vector of field elements to fix |
Definition at line 30 of file graph_description_aes128.test.cpp.
TEST | ( | boomerang_stdlib_aes | , |
test_graph_for_aes_64_bytes | |||
) |
Test graph description of AES128CBC circuit with 64 bytes of data.
This test verifies that:
Definition at line 44 of file graph_description_aes128.test.cpp.
TEST | ( | boomerang_stdlib_aes | , |
test_variable_gates_count_for_aes128cbc | |||
) |
Test variable gate counts for AES128CBC circuit.
This test verifies that:
Note: Input/output vectors, key, and IV variables might normally appear in only one gate, but we fix their witness values to ensure they appear in multiple gates.
Definition at line 98 of file graph_description_aes128.test.cpp.