34 static constexpr size_t SIZE = 2;
52 static constexpr size_t size() {
return SIZE; }
61 if (other.
P0() == Point::infinity() || other.
P1() == Point::infinity()) {
62 throw_or_abort(
"Cannot aggregate: incoming pairing points are at infinity (probably uninitialized).");
65 if (
P0() == Point::infinity() ||
P1() == Point::infinity()) {
70 P0() =
P0() + other.
P0() * aggregation_separator;
71 P1() =
P1() + other.
P1() * aggregation_separator;
87 std::array<Point, 2>
_points = { Point::infinity(), Point::infinity() };
94template <
typename Curve>
struct tuple_size<
bb::PairingPoints<Curve>> : std::integral_constant<size_t, 2> {};
#define BB_BENCH_NAME(name)
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
static constexpr size_t PUBLIC_INPUTS_SIZE
static constexpr size_t SIZE
PairingPoints(const Point &p0, const Point &p1)
bool check() const
Verify the pairing equation e(P0, [1]₂) · e(P1, [x]₂) = 1.
typename Curve::BaseField Fq
typename Curve::AffineElement Point
typename Curve::ScalarField Fr
Specialization for bn254.
bool pairing_check(const GroupElement &p0, const GroupElement &p1)
Verify the pairing equation e(P₀,[1]₂) · e(P₁,[x]₂) = [1]ₜ
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)