aboutsummaryrefslogtreecommitdiff
path: root/src/key.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2018-07-14 16:03:28 -0700
committerAndrew Chow <achow101-github@achow101.com>2018-08-09 18:39:56 -0700
commit18dfea0dd082af18dfb02981b7ee1cd44d514388 (patch)
treeed176dc1ae965ff650a12c4b81f4da91c35d783e /src/key.h
parent9d86aad287f07e20066138b9f909758ad7a2e098 (diff)
downloadbitcoin-18dfea0dd082af18dfb02981b7ee1cd44d514388.tar.xz
Always create 70 byte signatures with low R values
When extra entropy is not specified by the caller, CKey::Sign will now always create a signature that has a low R value and is at most 70 bytes. The resulting signature on the stack will be 71 bytes when the sighash byte is included. Using low R signatures means that the resulting DER encoded signature will never need to have additional padding to account for high R values.
Diffstat (limited to 'src/key.h')
-rw-r--r--src/key.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/key.h b/src/key.h
index f573a18a4e..ce49b3df02 100644
--- a/src/key.h
+++ b/src/key.h
@@ -114,7 +114,7 @@ public:
* Create a DER-serialized signature.
* The test_case parameter tweaks the deterministic nonce.
*/
- bool Sign(const uint256& hash, std::vector<unsigned char>& vchSig, uint32_t test_case = 0) const;
+ bool Sign(const uint256& hash, std::vector<unsigned char>& vchSig, bool grind = true, uint32_t test_case = 0) const;
/**
* Create a compact signature (65 bytes), which allows reconstructing the used public key.