51 Point::PUBLIC_INPUTS_SIZE);
52 Point P0 = Point::reconstruct_from_public(P0_limbs);
53 Point P1 = Point::reconstruct_from_public(P1_limbs);
63 if (
P0 == Point::infinity() ||
P1 == Point::infinity() || other.
P0 == Point::infinity() ||
64 other.
P1 == Point::infinity()) {
65 throw_or_abort(
"WARNING: Shouldn't be aggregating with Point at infinity! The pairing points are probably "
69 P0 =
P0 + other.
P0 * aggregation_separator;
70 P1 =
P1 + other.
P1 * aggregation_separator;
CommitmentKey object over a pairing group 𝔾₁.
An object storing two bn254 points that represent the inputs to a pairing check.
static constexpr size_t PUBLIC_INPUTS_SIZE
bool check() const
Perform the pairing check.
bool operator==(const PairingPoints &other) const =default
typename Curve::BaseField Fq
typename Curve::ScalarField Fr
void aggregate(const PairingPoints &other)
Aggregate the current pairing points with another set of pairing points using a random scalar.
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.
PairingPoints(const Point &P0, const Point &P1)
typename Curve::AffineElement Point
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)