Generate a DSA/ECDSA per-signature nonce in [0, ]range).
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);
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.
1 on success, or 0 on failure.
| 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 message in bytes. |
| ctx | BN_CTX for temporary BIGNUMs, or NULL. |