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

Add Fiat-Shamir Transformation into IOP #132

Closed
wants to merge 7 commits into from
Closed

Add Fiat-Shamir Transformation into IOP #132

wants to merge 7 commits into from

Conversation

f7ed
Copy link
Collaborator

@f7ed f7ed commented Aug 4, 2024

No description provided.

This was linked to issues Aug 19, 2024
@f7ed f7ed requested a review from xiangxiecrypto August 22, 2024 07:17
Copy link
Member

@xiangxiecrypto xiangxiecrypto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review is still ongoing

@@ -65,15 +72,82 @@ pub struct DecomposedBits<F: Field> {
/// number of variables of every polynomial
pub num_vars: usize,
/// batched plain deomposed bits, each of which corresponds to one bit decomposisiton instance
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// batched plain deomposed bits, each of which corresponds to one bit decomposisiton instance
/// batched plain deomposed bits, each of which corresponds to one bit decomposition instance

Comment on lines +123 to +140
for instance in &self.instances {
// For every bit, the reduced sum is $\sum_{x \in \{0, 1\}^\log M} eq(u, x) \cdot [\prod_{k=0}^B (d_i(x) - k)] = 0$
// and the added product is r_i \cdot eq(u, x) \cdot [\prod_{k=0}^B (d_i(x) - k)] with the corresponding randomness
for bit in instance {
let mut product: Vec<_> = Vec::with_capacity(base + 1);
let mut op_coefficient = Vec::with_capacity(base + 1);
product.push(Rc::clone(&identity_func_at_u));
op_coefficient.push((UF::one(), UF::zero()));

let mut minus_k = F::zero();
for _ in 0..base {
product.push(Rc::clone(bit));
op_coefficient.push((UF::one(), UF::BaseField(minus_k)));
minus_k -= F::one();
}
poly.add_product_with_linear_op(product, &op_coefficient, *r_iter.next().unwrap());
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here you are considering multiple instance of bit decomposition. For one instance, you are using r to combine them together. However, between instances, you just add the polys without random linear combination?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it is already a random linear combination.

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

Successfully merging this pull request may close these issues.

Add ExtensionField for PIOP Add FS to sumcheck and IOPs
2 participants