50 BB_ASSERT(idx < 2,
"Index out of bounds");
51 return idx == 0 ?
P0 :
P1;
56 BB_ASSERT(idx < 2,
"Index out of bounds");
57 return idx == 0 ?
P0 :
P1;
68 Point::PUBLIC_INPUTS_SIZE);
69 Point P0 = Point::reconstruct_from_public(P0_limbs);
70 Point P1 = Point::reconstruct_from_public(P1_limbs);
80 if (
P0 == Point::infinity() ||
P1 == Point::infinity() || other.
P0 == Point::infinity() ||
81 other.
P1 == Point::infinity()) {
82 throw_or_abort(
"WARNING: Shouldn't be aggregating with Point at infinity! The pairing points are probably "
86 P0 =
P0 + other.
P0 * aggregation_separator;
87 P1 =
P1 + other.
P1 * aggregation_separator;
#define BB_ASSERT(expression,...)
CommitmentKey object over a pairing group 𝔾₁.
An object storing two EC points that represent the inputs to a pairing check.
const Point & operator[](size_t idx) const
PairingPoints(std::array< Point, 2 > const &points)
PairingPoints(const Point &P0, const Point &P1)
void aggregate(const PairingPoints< Curve > &other)
Aggregate the current pairing points with another set of pairing points using a random scalar.
static PairingPoints< Curve > reconstruct_from_public(const std::span< const Fr, PUBLIC_INPUTS_SIZE > &limbs_in)
Reconstruct the pairing points from limbs stored on the public inputs.
bool operator==(const PairingPoints< Curve > &other) const =default
static constexpr size_t PUBLIC_INPUTS_SIZE
bool check() const
Perform the pairing check.
Point & operator[](size_t idx)
typename Curve::BaseField Fq
typename Curve::AffineElement Point
typename Curve::ScalarField Fr
Specialization for bn254.
bool pairing_check(const GroupElement &p0, const GroupElement &p1)
verifies a pairing equation over 2 points using the verifier SRS
Representation of the Grumpkin Verifier Commitment Key inside a bn254 circuit.
typename Group::affine_element AffineElement
Entry point for Barretenberg command-line interface.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
static field random_element(numeric::RNG *engine=nullptr) noexcept
void throw_or_abort(std::string const &err)