65 if (!this->has_data && other.
has_data) {
74 transcript.send_to_verifier(
"Accumulator_P1",
P1);
75 transcript.send_to_verifier(
"Aggregated_P0", other.
P0);
76 transcript.send_to_verifier(
"Aggregated_P1", other.
P1);
77 auto recursion_separator =
78 transcript.template get_challenge<typename Curve::ScalarField>(
"recursion_separator");
82 P0 = Group::batch_mul({
P0, other.
P0 }, { 1, recursion_separator });
83 P1 = Group::batch_mul({
P1, other.
P1 }, { 1, recursion_separator });
87 Group point_to_aggregate = other.
P0.scalar_mul(recursion_separator, 128);
88 P0 += point_to_aggregate;
89 point_to_aggregate = other.
P1.scalar_mul(recursion_separator, 128);
90 P1 += point_to_aggregate;
101 ASSERT(this->has_data,
"Calling set_public on empty pairing points.");
102 uint32_t start_idx =
P0.set_public();
116 const size_t FRS_PER_POINT = Group::PUBLIC_INPUTS_SIZE;
119 Group P0 = Group::reconstruct_from_public(P0_limbs);
120 Group P1 = Group::reconstruct_from_public(P1_limbs);
129 using BigGroup = element_default::
133 for (
size_t i = 0; i < 2; i++) {
135 for (
auto& val : element_vals) {
136 dummy_pairing_points_values[idx++] = val;
140 return dummy_pairing_points_values;
155 fq(
"0x031e97a575e9d05a107acb64952ecab75c020998797da7842ab5d6d1986846cf"));
157 fq(
"0x178cbf4206471d722669117f9758a4c410db10a01750aebb5666547acf8bd5a4"));
159 fq(
"0x0f94656a2ca489889939f81e9c74027fd51009034b3357f0e91b8a11e7842c38"));
161 fq(
"0x1b52c2020d7464a0c80c0da527a08193fe27776f50224bd6fb128b46c1ddb67f"));
195 return os <<
"P0: " << as.
P0 <<
"\n"
196 <<
"P1: " << as.
P1 <<
"\n"
197 <<
"has_data: " << as.
has_data <<
"\n";
#define ASSERT(expression,...)
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
void send_to_verifier(const std::string &label, const T &element)
Adds a prover message to the transcript, only intended to be used by the prover.
void convert_constant_to_fixed_witness(Builder *builder)
uint32_t set_public() const
Set the witness indices of the binary basis limbs to public.
Implements boolean logic in-circuit.
void write(std::vector< uint8_t > &buf, PairingPoints< Builder > const &as)
void read(uint8_t const *&it, PairingPoints< Builder > &as)
std::ostream & operator<<(std::ostream &os, PairingPoints< NCT > const &as)
field< Bn254FqParams > fq
void read(auto &it, msgpack_concepts::HasMsgPack auto &obj)
Automatically derived read for any object that defines .msgpack() (implicitly defined by MSGPACK_FIEL...
void write(auto &buf, const msgpack_concepts::HasMsgPack auto &obj)
Automatically derived write for any object that defines .msgpack() (implicitly defined by MSGPACK_FIE...
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
field_t< CircuitBuilder > ScalarField
element< CircuitBuilder, bigfield< CircuitBuilder, bb::Bn254FqParams >, ScalarField, GroupNative > Group
An object storing two EC points that represent the inputs to a pairing check.
PairingPoints(std::array< Group, 2 > const &points)
Curve::bool_ct operator==(PairingPoints const &other) const
static std::array< fr, PUBLIC_INPUTS_SIZE > construct_dummy()
typename Curve::Group Group
typename Curve::ScalarField Fr
PairingPoints(const Group &P0, const Group &P1)
static void add_default_to_public_inputs(Builder &builder)
Adds default public inputs to the builder.
void aggregate(PairingPoints const &other)
Compute a linear combination of the present pairing points with an input set of pairing points.
uint32_t set_public()
Set the witness indices for the limbs of the pairing points to public.
static constexpr size_t PUBLIC_INPUTS_SIZE
static PairingPoints< Builder > reconstruct_from_public(const std::span< const Fr, PUBLIC_INPUTS_SIZE > &limbs)
Reconstruct an PairingPoints from its representation as limbs (generally stored in the public inputs)