git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
2c8fe8e
)
BN_zero -> BN_set_word
author
CryptoManiac
<CryptoManiac@users.noreply.github.com>
Thu, 2 Dec 2021 17:32:36 +0000 (20:32 +0300)
committer
GitHub
<noreply@github.com>
Thu, 2 Dec 2021 17:32:36 +0000 (20:32 +0300)
src/key.cpp
patch
|
blob
|
history
diff --git
a/src/key.cpp
b/src/key.cpp
index
0aaa948
..
94a54ef
100644
(file)
--- a/
src/key.cpp
+++ b/
src/key.cpp
@@
-102,7
+102,7
@@
int ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig, const unsigned ch
if (!BN_bin2bn(msg, msglen, e)) { ret=-1; goto err; }
if (8*msglen > n) BN_rshift(e, e, 8-(n & 7));
zero = BN_CTX_get(ctx);
- BN_zero(zero);
+ if (!BN_set_word(zero, 0)) { ret=-1; goto err; }
if (!BN_mod_sub(e, zero, e, order, ctx)) { ret=-1; goto err; }
rr = BN_CTX_get(ctx);
if (!BN_mod_inverse(rr, ecsig_r, order, ctx)) { ret=-1; goto err; }