|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
An object storing two EC points that represent the inputs to a pairing check. More...
#include <pairing_points.hpp>
Public Types | |
| using | Builder = typename Curve::Builder |
| using | Group = Curve::Group |
| using | Fq = Curve::BaseField |
| using | Fr = Curve::ScalarField |
Public Member Functions | |
| PairingPoints ()=default | |
| PairingPoints (const Group &P0, const Group &P1) | |
| PairingPoints (std::array< Group, 2 > const &points) | |
| Group & | operator[] (size_t idx) |
| const Group & | operator[] (size_t idx) const |
| Curve::bool_ct | operator== (PairingPoints const &other) const |
| void | aggregate (PairingPoints const &other) |
| Compute a linear combination of the present pairing points with an input set of pairing points. | |
| uint32_t | set_public () |
| Set the witness indices for the limbs of the pairing points to public. | |
Static Public Member Functions | |
| static PairingPoints | aggregate_multiple (std::vector< PairingPoints > &pairing_points, bool handle_edge_cases=true) |
| Aggregate multiple PairingPoints using random linear combination. | |
| static uint32_t | set_default_to_public (Builder *builder) |
| Set the witness indices for the default limbs of the pairing points to public. | |
| static PairingPoints< Curve > | reconstruct_from_public (const std::span< const Fr, PUBLIC_INPUTS_SIZE > &limbs) |
| Reconstruct an PairingPoints from its representation as limbs (generally stored in the public inputs) | |
| static PairingPoints | construct_default () |
| Construct default pairing points. | |
Public Attributes | |
| Group | P0 |
| Group | P1 |
| bool | has_data = false |
| uint32_t | tag_index = 0 |
Static Public Attributes | |
| static constexpr size_t | PUBLIC_INPUTS_SIZE = PAIRING_POINTS_SIZE |
An object storing two EC points that represent the inputs to a pairing check.
The points may represent the output of a single partial recursive verification or the linear combination of multiple sets of pairing points.
TODO(https://github.com/AztecProtocol/barretenberg/issues/1421): Proper tests for PairingPoints TODO(https://github.com/AztecProtocol/barretenberg/issues/1571): Implement tagging mechanism
| Builder_ |
Definition at line 36 of file pairing_points.hpp.
| using bb::stdlib::recursion::PairingPoints< Curve >::Builder = typename Curve::Builder |
Definition at line 37 of file pairing_points.hpp.
| using bb::stdlib::recursion::PairingPoints< Curve >::Fq = Curve::BaseField |
Definition at line 39 of file pairing_points.hpp.
| using bb::stdlib::recursion::PairingPoints< Curve >::Fr = Curve::ScalarField |
Definition at line 40 of file pairing_points.hpp.
| using bb::stdlib::recursion::PairingPoints< Curve >::Group = Curve::Group |
Definition at line 38 of file pairing_points.hpp.
|
default |
|
inline |
Definition at line 52 of file pairing_points.hpp.
|
inline |
Definition at line 69 of file pairing_points.hpp.
|
inline |
Compute a linear combination of the present pairing points with an input set of pairing points.
The linear combination is done with a recursion separator that is the hash of the two sets of pairing points.
| other | |
| recursion_separator |
Definition at line 181 of file pairing_points.hpp.
|
inlinestatic |
Aggregate multiple PairingPoints using random linear combination.
The pairing points are aggregated using challenges generated as the consecutive hashes of the pairing points being aggregated. Computes: P_agg = P₀ + r₁·P₁ + r₂·P₂ + ... + rₙ₋₁·Pₙ₋₁ where r₁,...,rₙ₋₁ are 128-bit challenges derived from hashing all input points.
| pairing_points | Vector of pairing points to aggregate (requires size > 1) |
| handle_edge_cases | If true, batch_mul handles edge cases where points might be zero or challenges might cause numerical issues. If false, assumes all points are non-zero and non-colliding (saves circuit gates). |
Safety of handle_edge_cases=false:
Definition at line 104 of file pairing_points.hpp.
|
inlinestatic |
Construct default pairing points.
| builder |
Definition at line 281 of file pairing_points.hpp.
|
inline |
Definition at line 85 of file pairing_points.hpp.
|
inline |
Definition at line 73 of file pairing_points.hpp.
|
inline |
Definition at line 79 of file pairing_points.hpp.
|
inlinestatic |
Reconstruct an PairingPoints from its representation as limbs (generally stored in the public inputs)
| limbs | The limbs of the pairing points |
Definition at line 266 of file pairing_points.hpp.
|
inlinestatic |
Set the witness indices for the default limbs of the pairing points to public.
Definition at line 243 of file pairing_points.hpp.
|
inline |
Set the witness indices for the limbs of the pairing points to public.
Definition at line 229 of file pairing_points.hpp.
| bool bb::stdlib::recursion::PairingPoints< Curve >::has_data = false |
Definition at line 44 of file pairing_points.hpp.
| Group bb::stdlib::recursion::PairingPoints< Curve >::P0 |
Definition at line 41 of file pairing_points.hpp.
| Group bb::stdlib::recursion::PairingPoints< Curve >::P1 |
Definition at line 42 of file pairing_points.hpp.
|
staticconstexpr |
Definition at line 48 of file pairing_points.hpp.
| uint32_t bb::stdlib::recursion::PairingPoints< Curve >::tag_index = 0 |
Definition at line 45 of file pairing_points.hpp.