mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Deterministic signing
This commit is contained in:
parent
3060e36098
commit
a53fd41485
4 changed files with 49 additions and 14 deletions
|
|
@ -248,8 +248,9 @@ public:
|
|||
{
|
||||
uint256 hash = SignatureHash(scriptPubKey, spendTx, 0, nHashType);
|
||||
std::vector<unsigned char> vchSig, r, s;
|
||||
uint32_t iter = 0;
|
||||
do {
|
||||
key.Sign(hash, vchSig);
|
||||
key.Sign(hash, vchSig, iter++);
|
||||
if ((lenS == 33) != (vchSig[5 + vchSig[3]] == 33)) {
|
||||
NegateSignatureS(vchSig);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue