mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 18:52:29 +02:00
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user