Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong calculation of actual_sum in univariate sumcheck #51

Open
tsunrise opened this issue Jan 4, 2022 · 0 comments
Open

Wrong calculation of actual_sum in univariate sumcheck #51

tsunrise opened this issue Jan 4, 2022 · 0 comments

Comments

@tsunrise
Copy link

tsunrise commented Jan 4, 2022

#ifdef DEBUG
polynomial<FieldT> g = h_and_g.second;
FieldT actual_sum;
if (this->field_subset_type_ == affine_subspace_type) {
/* The second component is actually g + sum * x^{H_size-1}, but
we immediately remove its highest degree term */
actual_sum = g[this->summation_domain_size_-1];
g.set_degree(this->summation_domain_size_-2, true);
} else if (this->field_subset_type_ == multiplicative_coset_type) {
/* The second component is actually x*g + sum, but
we immediately remove its lowest degree term */
actual_sum = g[0];
g.remove_term(0);
}
#endif // DEBUG

Here, actual_sum should be g[0] * this->summation_domain_size instead of g[0].
Please see https://github.com/arkworks-rs/bcs/blob/2ddd1db3838cbf393a8d8d7eafe6a004aa584c61/sumcheck/src/util.rs#L16-L27 for a possible fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant