74 if (commitment_key.initialized()) {
76 transcript->send_to_verifier(
"Libra:concatenation_commitment", libra_commitment);
86 libra_challenge = transcript->template get_challenge<FF>(
"Libra:Challenge");
129 for (
auto& libra_polynomial : libra_full_polynomials) {
132 return libra_full_polynomials;
151 total_sum += univariate.at(0) + univariate.evaluate(
FF(1));
154 total_sum *= scaling_factor;
211 std::array<FF, SUBGROUP_SIZE> coeffs_lagrange_subgroup;
215 coeffs_lagrange_subgroup[idx] =
FF{ 0 };
231 libra_concatenated_monomial_form_unmasked =
234 std::vector<FF> coeffs_lagrange_subgroup_ifft(
SUBGROUP_SIZE);
237 libra_concatenated_monomial_form_unmasked =
Polynomial<FF>(coeffs_lagrange_subgroup_ifft);
244 for (
size_t idx = 0; idx < masking_scalars.
size(); idx++) {
277 static constexpr FF two_inv =
FF(1) /
FF(2);
281 univariate *= two_inv;
287 this->libra_running_sum += -next_libra_univariate.at(0) - next_libra_univariate.evaluate(
FF(1));
288 this->libra_running_sum *= two_inv;
290 this->libra_running_sum += libra_evaluation;
296 const FF libra_evaluation =
299 this->libra_evaluations.emplace_back(libra_evaluation);
CommitmentKey object over a pairing group 𝔾₁.
Structured polynomial class that represents the coefficients 'a' of a_0 + a_1 x .....
Fr & at(size_t index)
Our mutable accessor, unlike operator[]. We abuse precedent a bit to differentiate at() and operator[...
A univariate polynomial represented by its values on {domain_start, domain_start + 1,...
static Univariate get_random()
static constexpr size_t SUBGROUP_SIZE
static constexpr uint32_t LIBRA_UNIVARIATES_LENGTH
static constexpr ScalarField subgroup_generator
void ifft(Fr *coeffs, const EvaluationDomain< Fr > &domain)
Entry point for Barretenberg command-line interface.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
This structure is created to contain various polynomials and constants required by ZK Sumcheck.
Polynomial< FF > libra_concatenated_monomial_form
static constexpr size_t LIBRA_UNIVARIATES_LENGTH
std::vector< Polynomial< FF > > libra_univariates
ClaimedLibraEvaluations libra_evaluations
static constexpr FF subgroup_generator
typename Curve::ScalarField FF
Polynomial< FF > libra_concatenated_lagrange_form
static std::vector< Polynomial< FF > > generate_libra_univariates(const size_t number_of_polynomials, const size_t univariate_length)
Given number of univariate polynomials and the number of their evaluations meant to be hidden,...
ZKSumcheckData(const size_t multivariate_d, std::shared_ptr< typename Flavor::Transcript > transcript=nullptr, const typename Flavor::CommitmentKey &commitment_key=typename Flavor::CommitmentKey())
std::vector< FF > ClaimedLibraEvaluations
static constexpr FF one_half
void update_zk_sumcheck_data(const FF &round_challenge, const size_t round_idx)
Upon receiving the challenge , the prover updates Libra data. If .
static FF compute_libra_total_sum(const std::vector< Polynomial< FF > > &libra_univariates, FF &scaling_factor, const FF &constant_term)
Compute the sum of the randomly sampled multivariate polynomial over the Boolean hypercube.
static void setup_auxiliary_data(auto &libra_univariates, FF &libra_scaling_factor, const FF &libra_challenge, FF &libra_running_sum)
Set up Libra book-keeping table that simplifies the computation of Libra Round Univariates.
EvaluationDomain< FF > bn_evaluation_domain
typename Flavor::Curve Curve
std::array< FF, SUBGROUP_SIZE > interpolation_domain
static constexpr size_t SUBGROUP_SIZE
void create_interpolation_domain()
Create a interpolation domain object and initialize the evaluation domain in the case of BN254 scalar...
ZKSumcheckData(const size_t multivariate_d, const size_t univariate_length)
For test purposes: Constructs a sumcheck instance from the polynomial , where is a random univariate...
void compute_concatenated_libra_polynomial()
Compute concatenated libra polynomial in lagrange basis, transform to monomial, add masking term Z_H(...