Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::PairingPoints Class Reference

An object storing two bn254 points that represent the inputs to a pairing check. More...

#include <pairing_points.hpp>

Public Member Functions

 PairingPoints ()=default
 
 PairingPoints (const Point &P0, const Point &P1)
 
void aggregate (const PairingPoints &other)
 Aggregate the current pairing points with another set of pairing points using a random scalar.
 
bool check () const
 Perform the pairing check.
 
bool operator== (const PairingPoints &other) const =default
 

Static Public Member Functions

static PairingPoints reconstruct_from_public (const std::span< const Fr, PUBLIC_INPUTS_SIZE > &limbs_in)
 Reconstruct the pairing points from limbs stored on the public inputs.
 

Public Attributes

Point P0 = Point::infinity()
 
Point P1 = Point::infinity()
 

Static Public Attributes

static constexpr size_t PUBLIC_INPUTS_SIZE = PAIRING_POINTS_SIZE
 

Private Types

using Curve = curve::BN254
 
using CK = CommitmentKey< Curve >
 
using Point = typename Curve::AffineElement
 
using Fr = typename Curve::ScalarField
 
using Fq = typename Curve::BaseField
 
using VerifierCK = VerifierCommitmentKey< curve::BN254 >
 

Detailed Description

An object storing two bn254 points that represent the inputs to a pairing check.

The points may represent the output of a single partial verification or the linear combination of multiple sets of pairing points, i.e. a pairing point "accumulator".

Note
This class is the native analog to the stdlib::PairingPoints class.

Definition at line 23 of file pairing_points.hpp.

Member Typedef Documentation

◆ CK

Definition at line 25 of file pairing_points.hpp.

◆ Curve

Definition at line 24 of file pairing_points.hpp.

◆ Fq

using bb::PairingPoints::Fq = typename Curve::BaseField
private

Definition at line 28 of file pairing_points.hpp.

◆ Fr

using bb::PairingPoints::Fr = typename Curve::ScalarField
private

Definition at line 27 of file pairing_points.hpp.

◆ Point

Definition at line 26 of file pairing_points.hpp.

◆ VerifierCK

Constructor & Destructor Documentation

◆ PairingPoints() [1/2]

bb::PairingPoints::PairingPoints ( )
default

◆ PairingPoints() [2/2]

bb::PairingPoints::PairingPoints ( const Point P0,
const Point P1 
)
inline

Definition at line 38 of file pairing_points.hpp.

Member Function Documentation

◆ aggregate()

void bb::PairingPoints::aggregate ( const PairingPoints other)
inline

Aggregate the current pairing points with another set of pairing points using a random scalar.

Definition at line 61 of file pairing_points.hpp.

◆ check()

bool bb::PairingPoints::check ( ) const
inline

Perform the pairing check.

Definition at line 76 of file pairing_points.hpp.

◆ operator==()

bool bb::PairingPoints::operator== ( const PairingPoints other) const
default

◆ reconstruct_from_public()

static PairingPoints bb::PairingPoints::reconstruct_from_public ( const std::span< const Fr, PUBLIC_INPUTS_SIZE > &  limbs_in)
inlinestatic

Reconstruct the pairing points from limbs stored on the public inputs.

Definition at line 47 of file pairing_points.hpp.

Member Data Documentation

◆ P0

Point bb::PairingPoints::P0 = Point::infinity()

Definition at line 34 of file pairing_points.hpp.

◆ P1

Point bb::PairingPoints::P1 = Point::infinity()

Definition at line 35 of file pairing_points.hpp.

◆ PUBLIC_INPUTS_SIZE

constexpr size_t bb::PairingPoints::PUBLIC_INPUTS_SIZE = PAIRING_POINTS_SIZE
staticconstexpr

Definition at line 32 of file pairing_points.hpp.


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