Generate a DSA/ECDSA per‐signature nonce in [0, ]`range).`
Synopsis
Declared in <openssl/bn.h>
int
BN_generate_dsa_nonce(
BIGNUM* out,
BIGNUM const* range,
BIGNUM const* priv,
unsigned char const* message,
size_t message_len,
BN_CTX* ctx);
Description
Mixes priv and message with fresh entropy so an RNG failure alone cannot expose the private key the way a raw BN_rand_range() nonce would.
Return Value
1 on success, or 0 on failure.
Parameters
Name |
Description |
out |
Destination BIGNUM that receives the nonce k. |
range |
Exclusive upper bound (typically the group order). |
priv |
Private key value mixed into the nonce derivation. |
message |
Message/digest octets mixed into the nonce derivation. |
message_len |
Length of |
ctx |
BN_CTX for temporary BIGNUMs, or NULL. |
Created with MrDocs