Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::stdlib::recursion::PairingPoints< Curve > Struct Template Reference

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)
 
Groupoperator[] (size_t idx)
 
const Groupoperator[] (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)
 Aggregate multiple PairingPoints.
 
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< Curvereconstruct_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
 

Detailed Description

template<typename Curve>
struct bb::stdlib::recursion::PairingPoints< Curve >

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

Template Parameters
Builder_

Definition at line 34 of file pairing_points.hpp.

Member Typedef Documentation

◆ Builder

template<typename Curve >
using bb::stdlib::recursion::PairingPoints< Curve >::Builder = typename Curve::Builder

Definition at line 35 of file pairing_points.hpp.

◆ Fq

Definition at line 37 of file pairing_points.hpp.

◆ Fr

Definition at line 38 of file pairing_points.hpp.

◆ Group

template<typename Curve >
using bb::stdlib::recursion::PairingPoints< Curve >::Group = Curve::Group

Definition at line 36 of file pairing_points.hpp.

Constructor & Destructor Documentation

◆ PairingPoints() [1/3]

template<typename Curve >
bb::stdlib::recursion::PairingPoints< Curve >::PairingPoints ( )
default

◆ PairingPoints() [2/3]

template<typename Curve >
bb::stdlib::recursion::PairingPoints< Curve >::PairingPoints ( const Group P0,
const Group P1 
)
inline

Definition at line 50 of file pairing_points.hpp.

◆ PairingPoints() [3/3]

template<typename Curve >
bb::stdlib::recursion::PairingPoints< Curve >::PairingPoints ( std::array< Group, 2 > const &  points)
inline

Definition at line 67 of file pairing_points.hpp.

Member Function Documentation

◆ aggregate()

template<typename Curve >
void bb::stdlib::recursion::PairingPoints< Curve >::aggregate ( PairingPoints< Curve > const &  other)
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.

Parameters
other
recursion_separator

Definition at line 142 of file pairing_points.hpp.

◆ aggregate_multiple()

template<typename Curve >
static PairingPoints bb::stdlib::recursion::PairingPoints< Curve >::aggregate_multiple ( std::vector< PairingPoints< Curve > > &  pairing_points)
inlinestatic

Aggregate multiple PairingPoints.

The pairing points are aggregated using challenges generated as the consecutive hashes of the pairing points being aggregated.

Definition at line 91 of file pairing_points.hpp.

◆ construct_default()

template<typename Curve >
static PairingPoints bb::stdlib::recursion::PairingPoints< Curve >::construct_default ( )
inlinestatic

Construct default pairing points.

Parameters
builder

Definition at line 242 of file pairing_points.hpp.

◆ operator==()

template<typename Curve >
Curve::bool_ct bb::stdlib::recursion::PairingPoints< Curve >::operator== ( PairingPoints< Curve > const &  other) const
inline

Definition at line 83 of file pairing_points.hpp.

◆ operator[]() [1/2]

template<typename Curve >
Group & bb::stdlib::recursion::PairingPoints< Curve >::operator[] ( size_t  idx)
inline

Definition at line 71 of file pairing_points.hpp.

◆ operator[]() [2/2]

template<typename Curve >
const Group & bb::stdlib::recursion::PairingPoints< Curve >::operator[] ( size_t  idx) const
inline

Definition at line 77 of file pairing_points.hpp.

◆ reconstruct_from_public()

template<typename Curve >
static PairingPoints< Curve > bb::stdlib::recursion::PairingPoints< Curve >::reconstruct_from_public ( const std::span< const Fr, PUBLIC_INPUTS_SIZE > &  limbs)
inlinestatic

Reconstruct an PairingPoints from its representation as limbs (generally stored in the public inputs)

Parameters
limbsThe limbs of the pairing points
Returns
PairingPoints<Curve>

Definition at line 227 of file pairing_points.hpp.

◆ set_default_to_public()

template<typename Curve >
static uint32_t bb::stdlib::recursion::PairingPoints< Curve >::set_default_to_public ( Builder builder)
inlinestatic

Set the witness indices for the default limbs of the pairing points to public.

Returns
uint32_t The index into the public inputs array at which the representation is stored

Definition at line 204 of file pairing_points.hpp.

◆ set_public()

template<typename Curve >
uint32_t bb::stdlib::recursion::PairingPoints< Curve >::set_public ( )
inline

Set the witness indices for the limbs of the pairing points to public.

Returns
uint32_t The index into the public inputs array at which the representation is stored

Definition at line 190 of file pairing_points.hpp.

Member Data Documentation

◆ has_data

template<typename Curve >
bool bb::stdlib::recursion::PairingPoints< Curve >::has_data = false

Definition at line 42 of file pairing_points.hpp.

◆ P0

Definition at line 39 of file pairing_points.hpp.

◆ P1

Definition at line 40 of file pairing_points.hpp.

◆ PUBLIC_INPUTS_SIZE

template<typename Curve >
constexpr size_t bb::stdlib::recursion::PairingPoints< Curve >::PUBLIC_INPUTS_SIZE = PAIRING_POINTS_SIZE
staticconstexpr

Definition at line 46 of file pairing_points.hpp.

◆ tag_index

template<typename Curve >
uint32_t bb::stdlib::recursion::PairingPoints< Curve >::tag_index = 0

Definition at line 43 of file pairing_points.hpp.


The documentation for this struct was generated from the following file: