Skip to content

Commit

Permalink
refactor: test going back to MSM in fold
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker committed Feb 2, 2024
1 parent c43fd4c commit 357a6f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/provider/pedersen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,10 @@ where
// combines the left and right halves of `self` using `w1` and `w2` as the weights
fn fold(L: &Self, R: &Self, w1: &E::Scalar, w2: &E::Scalar) -> Self {
debug_assert!(L.ck.len() == R.ck.len());
let ck_curve: Vec<E::GE> =
zip_with!(par_iter, (L.ck, R.ck), |l, r| *l * w1 + *r * w2).collect();
let ck_curve: Vec<E::GE> = zip_with!(par_iter, (L.ck, R.ck), |l, r| {
E::GE::vartime_multiscalar_mul(&[*w1, *w2], &[*l, *r])
})
.collect();
let mut ck_affine = vec![<E::GE as PrimeCurve>::Affine::identity(); L.ck.len()];
E::GE::batch_normalize(&ck_curve, &mut ck_affine);

Expand Down

0 comments on commit 357a6f7

Please sign in to comment.