Convert index to little-endian

This commit is contained in:
DoHoonKim
2024-05-17 01:53:16 +09:00
parent f1757f3c7d
commit e84c5a55c0
2 changed files with 2 additions and 2 deletions

View File

@@ -56,6 +56,7 @@ impl<F: PrimeField + Hash> Table<F> {
for c in binary_string.chars() {
binary_vec.push(F::from(c.to_digit(10).unwrap() as u64));
}
binary_vec.reverse();
indices.push(binary_vec);
} else {
return Err(ProtocolError::NotInclusion);

View File

@@ -57,8 +57,7 @@ impl<
let table_dim = table_poly.num_vars();
let sigmas = &evals[1..1 + table_dim];
let mut s = evals.iter().skip(1).take(table_dim).cloned().collect_vec();
s.reverse();
(evals[0] - table_poly.evaluate(s.as_slice())
(evals[0] - table_poly.eval_by_coeff(s.as_slice())
+ sigmas
.iter()
.zip(powers(gamma).skip(1).take(table_dim))