84 m =
std::max(c.commitment_index + 1, m);
94 const FF& subgroup_generator)
103 result[i] = challenge * subgroup_generator;
116template <
typename Curve>
122 const FF inv_z_minus_challenge =
FF(1) / (shplonk_evaluation_challenge - small_ipa_evaluation_challenge);
123 const FF inv_z_minus_shifted =
125 const FF inv_z_minus_one =
FF(1) / (shplonk_evaluation_challenge -
FF(1));
131 result[i] = inv_z_minus_challenge;
134 result[i] = inv_z_minus_shifted;
137 result[i] = inv_z_minus_one;
171template <
typename Curve,
typename Transcript>
175 std::string_view label_prefix,
176 const std::shared_ptr<Transcript>& transcript)
185 FF evaluation =
FF(0);
187 evaluation = poly.evaluate(points[i]);
188 transcript->send_to_verifier(labels[i], evaluation);
190 claims[i] = { poly, { points[i], evaluation } };
205template <
typename Curve,
typename Transcript>
207 std::string_view label_prefix,
const std::shared_ptr<Transcript>& transcript)
214 evaluations[i] = transcript->template receive_from_prover<FF>(labels[i]);
218 for (
auto& eval : evaluations) {
219 eval.clear_round_provenance();
229template <
typename Curve,
typename Transcript>
233 std::string_view label_prefix,
234 const std::shared_ptr<Transcript>& transcript)
237 const auto evaluations = receive_small_ipa_evaluations<Curve>(label_prefix, transcript);
242 claims[i] = { { points[i], evaluations[i] }, commitments[
SMALL_IPA_CLAIMS[i].commitment_index] };
bb::field< bb::Bn254FrParams > FF
static constexpr bool is_stdlib_type
static constexpr ScalarField subgroup_generator
Entry point for Barretenberg command-line interface.
std::array< typename Curve::ScalarField, NUM_SMALL_IPA_OPENING_CLAIMS > receive_small_ipa_evaluations(std::string_view label_prefix, const std::shared_ptr< Transcript > &transcript)
Receive the five SmallSubgroupIPA evaluations on the verifier side.
constexpr size_t NUM_SMALL_IPA_COMMITMENTS
constexpr size_t NUM_SMALL_IPA_TRANSCRIPT_EVALS
constexpr auto SMALL_IPA_CLAIMS
The five SmallSubgroupIPA opening claims, in transcript order.
SmallIpaEvalPoint
Recipe for the evaluation point of a single SmallSubgroupIPA opening claim.
std::array< ProverOpeningClaim< Curve >, NUM_SMALL_IPA_OPENING_CLAIMS > make_small_ipa_prover_opening_claims(const std::array< bb::Polynomial< typename Curve::ScalarField >, NUM_SMALL_IPA_COMMITMENTS > &polynomials, const typename Curve::ScalarField &challenge, std::string_view label_prefix, const std::shared_ptr< Transcript > &transcript)
Build the five SmallSubgroupIPA prover opening claims.
std::array< typename Curve::ScalarField, NUM_SMALL_IPA_OPENING_CLAIMS > compute_shplonk_denominators_for_small_ipa(const typename Curve::ScalarField &shplonk_evaluation_challenge, const typename Curve::ScalarField &small_ipa_evaluation_challenge)
Compute Shplonk denominators 1 / (z - x_i), where x_i are the SmallSubgroupIPA opening points.
std::array< FF, NUM_SMALL_IPA_OPENING_CLAIMS > compute_evaluation_points(const FF &challenge, const FF &subgroup_generator)
Compute the evaluation points {r, g*r, r, 1, r} for the five opening claims by walking SMALL_IPA_CLAI...
std::array< OpeningClaim< Curve >, NUM_SMALL_IPA_OPENING_CLAIMS > make_small_ipa_verifier_opening_claims(const std::array< typename Curve::AffineElement, NUM_SMALL_IPA_COMMITMENTS > &commitments, const typename Curve::ScalarField &challenge, std::string_view label_prefix, const std::shared_ptr< Transcript > &transcript)
Build the five SmallSubgroupIPA verifier opening claims, pairing each evaluation with the commitment ...
constexpr size_t NUM_SMALL_IPA_OPENING_CLAIMS
std::array< std::string, NUM_SMALL_IPA_OPENING_CLAIMS > get_evaluation_labels(std::string_view prefix)
Build the wire labels {prefix + suffix} for the five opening claims. prefix is "Libra:" or "Translati...
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Static specification of one SmallSubgroupIPA opening claim.
std::string_view label_suffix
SmallIpaEvalPoint eval_point
Holds commitments to [G], [A], [Q]. Code that needs a per-claim commitment must index as_array() via ...
std::array< Commitment, NUM_SMALL_IPA_COMMITMENTS > as_array() const