-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
algebra/src/polynomial/multivariate/multilinear/unified_field.rs
Outdated
Show resolved
Hide resolved
algebra/src/polynomial/multivariate/multilinear/unified_field.rs
Outdated
Show resolved
Hide resolved
algebra/src/polynomial/multivariate/multilinear/unified_field.rs
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// 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 |
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()); | ||
} | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
No description provided.