mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-05 07:13:08 +00:00
Double blinding
This commit is contained in:
parent
5706c424f4
commit
03d761ead6
@ -151,7 +151,7 @@ fn fri_combine_initial<F: Field>(
|
||||
.map(|(v, _)| v)
|
||||
.flatten()
|
||||
.rev()
|
||||
.skip(if config.blinding { 1 } else { 0 })
|
||||
.skip(if config.blinding { 2 } else { 0 }) // If blinding, the last two element are salt.
|
||||
.fold(F::ZERO, |acc, &e| alpha * acc + e);
|
||||
let numerator = e - interpolant.eval(subgroup_x);
|
||||
let denominator = points.iter().map(|&(x, _)| subgroup_x - x).product();
|
||||
|
||||
@ -29,11 +29,18 @@ impl<F: Field> ListPolynomialCommitment<F> {
|
||||
.coset_fft(F::MULTIPLICATIVE_GROUP_GENERATOR)
|
||||
.values
|
||||
})
|
||||
.chain(fri_config.blinding.then(|| {
|
||||
(0..(degree << fri_config.rate_bits))
|
||||
.map(|_| F::rand())
|
||||
.chain(if fri_config.blinding {
|
||||
// If blinding, salt with two random elements to each leaf vector.
|
||||
(0..2)
|
||||
.map(|_| {
|
||||
(0..(degree << fri_config.rate_bits))
|
||||
.map(|_| F::rand())
|
||||
.collect()
|
||||
})
|
||||
.collect()
|
||||
}))
|
||||
} else {
|
||||
Vec::new()
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let mut leaves = transpose(&lde_values);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user