Switch test case signing to RFC6979 extra entropy

Instead of manually tweaking the deterministic nonce post-generation,
pass the test case number in as extra entropy to RFC6979.
This commit is contained in:
Pieter Wuille
2015-03-27 15:31:44 -07:00
parent 223d8630b0
commit 437ada3e55
4 changed files with 49 additions and 60 deletions

View File

@@ -124,8 +124,7 @@ public:
/**
* Create a DER-serialized signature.
* The test_case parameter tweaks the deterministic nonce, and is only for
* testing. It should be zero for normal use.
* The test_case parameter tweaks the deterministic nonce.
*/
bool Sign(const uint256& hash, std::vector<unsigned char>& vchSig, uint32_t test_case = 0) const;