|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
This file contains part of the logic for the Origin Tag mechanism that tracks the use of in-circuit primitives through tainting (common term meaning adding information that allows to track value origins) them. It then allows us to detect dangerous behaviours in-circuit. The mechanism is only enabled in DEBUG builds. More...
#include "barretenberg/common/assert.hpp"#include "barretenberg/common/throw_or_abort.hpp"#include "barretenberg/numeric/uint256/uint256.hpp"#include <atomic>#include <cstddef>#include <iterator>#include <ostream>#include <type_traits>#include <vector>Go to the source code of this file.
Classes | |
| struct | is_iterable< T, typename > |
| struct | is_iterable< T, std::void_t< decltype(std::begin(std::declval< T & >())), decltype(std::end(std::declval< T & >()))> > |
| struct | bb::OriginTag |
Namespaces | |
| namespace | bb |
| Entry point for Barretenberg command-line interface. | |
Concepts | |
| concept | usesTag |
Macros | |
| #define | STANDARD_TESTING_TAGS |
Functions | |
| void | bb::check_round_provenance (const uint256_t &provenance_a, const uint256_t &provenance_b) |
| Detect if two elements from the same transcript are performing a suspicious interaction. | |
| std::ostream & | bb::operator<< (std::ostream &os, OriginTag const &v) |
| template<bool in_circuit, typename T > | |
| void | bb::assign_origin_tag (T &elem, const OriginTag &tag) |
| Assigns an origin tag to an element or all elements in an iterable container. | |
| template<bool in_circuit, typename T > | |
| void | bb::check_origin_tag (T &elem, const OriginTag &tag) |
| Checks that an element or all elements in an iterable container have the expected origin tag. | |
| template<bool in_circuit, typename DataType > | |
| void | bb::unset_free_witness_tags (std::vector< DataType > &input) |
| Unsets free witness tags on all elements in a vector. | |
| template<bool in_circuit, typename Codec , typename T > | |
| std::vector< typename Codec::DataType > | bb::tag_and_serialize (const T &component, const OriginTag &tag) |
| Tag a component with a given origin tag and serialize it to field elements. | |
| template<typename TranscriptType > | |
| OriginTag | bb::extract_transcript_tag (const TranscriptType &transcript) |
| Extract origin tag context from a transcript. | |
Variables | |
| template<typename T > | |
| constexpr bool | is_iterable_v = is_iterable<T>::value |
This file contains part of the logic for the Origin Tag mechanism that tracks the use of in-circuit primitives through tainting (common term meaning adding information that allows to track value origins) them. It then allows us to detect dangerous behaviours in-circuit. The mechanism is only enabled in DEBUG builds.
Definition in file origin_tag.hpp.
| #define STANDARD_TESTING_TAGS |
Definition at line 36 of file origin_tag.hpp.
|
constexpr |
Definition at line 34 of file origin_tag.hpp.