Fix bug in wnaf_fixed where the wnaf array is not completely zeroed when given a 0 scalar.
This commit is contained in:
parent
96f68a0afc
commit
9e36d1bfe2
|
@ -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…
Reference in New Issue