Skip to content

Commit e7d3844

Browse files
real-or-randomtheStack
authored andcommitted
Don't clear secrets in pippenger implementation
This code is not supposed to handle secret data.
1 parent f0868a9 commit e7d3844

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/ecmult_impl.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,6 @@ static int secp256k1_ecmult_pippenger_batch(const secp256k1_callback* error_call
660660
struct secp256k1_pippenger_state *state_space;
661661
size_t idx = 0;
662662
size_t point_idx = 0;
663-
int i, j;
664663
int bucket_window;
665664

666665
secp256k1_gej_set_infinity(r);
@@ -708,18 +707,6 @@ static int secp256k1_ecmult_pippenger_batch(const secp256k1_callback* error_call
708707
}
709708

710709
secp256k1_ecmult_pippenger_wnaf(buckets, bucket_window, state_space, r, scalars, points, idx);
711-
712-
/* Clear data */
713-
for(i = 0; (size_t)i < idx; i++) {
714-
secp256k1_scalar_clear(&scalars[i]);
715-
state_space->ps[i].skew_na = 0;
716-
for(j = 0; j < WNAF_SIZE(bucket_window+1); j++) {
717-
state_space->wnaf_na[i * WNAF_SIZE(bucket_window+1) + j] = 0;
718-
}
719-
}
720-
for(i = 0; i < 1<<bucket_window; i++) {
721-
secp256k1_gej_clear(&buckets[i]);
722-
}
723710
secp256k1_scratch_apply_checkpoint(error_callback, scratch, scratch_checkpoint);
724711
return 1;
725712
}

0 commit comments

Comments
 (0)