mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Fix zeroization timeline in multiexp, cargo machete
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user