|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Testing functions to generate the AES128Test test suite. More...
Classes | |
| class | InvalidWitness |
Public Types | |
| using | Builder = Builder_ |
| using | AcirConstraint = AES128Constraint |
| using | FF = typename Builder::FF |
Static Public Member Functions | |
| static ProgramMetadata | generate_metadata () |
| static void | generate_constraints (AcirConstraint &constraint, WitnessVector &witness_values) |
| Generate valid AES128 encryption constraints with random inputs. | |
| static std::pair< AcirConstraint, WitnessVector > | invalidate_witness (AcirConstraint constraint, WitnessVector witness_values, const typename InvalidWitness::Target &target) |
| Invalidate witness values to test circuit failure detection. | |
Static Private Member Functions | |
| static std::vector< uint8_t > | native_aes128_cbc_encrypt (const std::vector< uint8_t > &plaintext, const std::array< uint8_t, 16 > &key, const std::array< uint8_t, 16 > &iv) |
| Native AES-128-CBC encryption for generating expected outputs. | |
Testing functions to generate the AES128Test test suite.
Tests that:
| Builder_ | The circuit builder type |
| IsKeyConstant | If true, the encryption key is a constant (not a witness) |
| IsIVConstant | If true, the initialization vector is a constant (not a witness) |
Definition at line 37 of file aes128_constraint.test.cpp.
| using AES128TestingFunctions< Builder_, IsPlaintextConstant, IsKeyConstant, IsIVConstant >::AcirConstraint = AES128Constraint |
Definition at line 40 of file aes128_constraint.test.cpp.
| using AES128TestingFunctions< Builder_, IsPlaintextConstant, IsKeyConstant, IsIVConstant >::Builder = Builder_ |
Definition at line 39 of file aes128_constraint.test.cpp.
| using AES128TestingFunctions< Builder_, IsPlaintextConstant, IsKeyConstant, IsIVConstant >::FF = typename Builder::FF |
Definition at line 41 of file aes128_constraint.test.cpp.
|
inlinestatic |
Generate valid AES128 encryption constraints with random inputs.
Creates a constraint with:
Definition at line 97 of file aes128_constraint.test.cpp.
|
inlinestatic |
Definition at line 86 of file aes128_constraint.test.cpp.
|
inlinestatic |
Invalidate witness values to test circuit failure detection.
Definition at line 169 of file aes128_constraint.test.cpp.
|
inlinestaticprivate |
Native AES-128-CBC encryption for generating expected outputs.
Uses the native crypto implementation to compute expected ciphertext. For full blocks (plaintext.size() % 16 == 0), no padding is added to match circuit behavior.
Definition at line 227 of file aes128_constraint.test.cpp.