35 static constexpr size_t SIZE = 2;
37 std::array<Point, 2>
_points = { Point::infinity(), Point::infinity() };
58 static constexpr size_t size() {
return SIZE; }
65 if (
P0() == Point::infinity() ||
P1() == Point::infinity() || other.
P0() == Point::infinity() ||
66 other.
P1() == Point::infinity()) {
67 throw_or_abort(
"WARNING: Shouldn't be aggregating with Point at infinity! The pairing points are probably "
71 P0() =
P0() + other.
P0() * aggregation_separator;
72 P1() =
P1() + other.
P1() * aggregation_separator;
93template <
typename Curve>
struct tuple_size<
bb::PairingPoints<Curve>> : std::integral_constant<size_t, 2> {};
CommitmentKey object over a pairing group 𝔾₁.
An object storing two EC points that represent the inputs to a pairing check.
void aggregate(const PairingPoints< Curve > &other)
Aggregate the current pairing points with another set of pairing points using a random scalar.
static constexpr size_t size()
std::array< Point, 2 > _points
bool operator==(const PairingPoints< Curve > &other) const =default
static constexpr size_t PUBLIC_INPUTS_SIZE
static constexpr size_t SIZE
PairingPoints(const Point &p0, const Point &p1)
bool check() const
Perform the pairing check.
typename Curve::BaseField Fq
const auto & operator[](size_t idx) const
typename Curve::AffineElement Point
auto & operator[](size_t idx)
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)