Browse Source

Fix bug in wnaf_fixed where the wnaf array is not completely zeroed when given a 0 scalar.

master^2
Jonas Nick 5 years ago
parent
commit
9e36d1bfe2
  1. 3
      src/ecmult_impl.h

3
src/ecmult_impl.h

@ -571,9 +571,8 @@ static int secp256k1_wnaf_fixed(int *wnaf, const secp256k1_scalar *s, int w) { @@ -571,9 +571,8 @@ static int secp256k1_wnaf_fixed(int *wnaf, const secp256k1_scalar *s, int w) {
const secp256k1_scalar *work = s;
if (secp256k1_scalar_is_zero(s)) {
while (pos * w < WNAF_BITS) {
for (pos = 0; pos < WNAF_SIZE(w); pos++) {
wnaf[pos] = 0;
++pos;
}
return 0;
}

Loading…
Cancel
Save