Fix zeroization timeline in multiexp, cargo machete

This commit is contained in:
Luke Parker
2025-08-20 00:35:56 -04:00
parent 38bda1d586
commit 677a2e5749
4 changed files with 4 additions and 5 deletions

View File

@@ -25,13 +25,14 @@ pub(crate) fn pippenger<G: Zeroize + Group<Scalar: PrimeFieldBits>>(
for p in 0 .. bits.len() {
buckets[usize::from(bits[p][n])] += pairs[p].1;
}
buckets.zeroize();
let mut intermediate_sum = G::identity();
for b in (1 .. buckets.len()).rev() {
intermediate_sum += buckets[b];
res += intermediate_sum;
}
buckets.zeroize();
}
bits.zeroize();