Add ability to pass extra entropy to rfc6979

Suggested by Greg Maxwell.
This commit is contained in:
Pieter Wuille
2015-03-20 09:19:38 -07:00
parent 3087bc4d75
commit 1573a102c0
7 changed files with 25 additions and 9 deletions

View File

@@ -97,7 +97,10 @@ typedef int (*secp256k1_nonce_function_t)(
const void *data
);
/** An implementation of RFC6979 (using HMAC-SHA256) as nonce generation function. */
/** An implementation of RFC6979 (using HMAC-SHA256) as nonce generation function.
* If a data pointer is passed, it is assumed to be a pointer to 32 bytes of
* extra entropy.
*/
extern const secp256k1_nonce_function_t secp256k1_nonce_function_rfc6979;
/** A default safe nonce generation function (currently equal to secp256k1_nonce_function_rfc6979). */