rfc6979Nonce

private fnBigInt rfc6979Nonce(BigInt x, const(ubyte)[] digest, BigInt q, size_t qLen, size_t qBitLen, HashFactory hashFactory)

Generates a deterministic ECDSA nonce k per RFC 6979 Section 3.2.

This function implements the HMAC-DRBG-based deterministic nonce generation algorithm, producing a predictable k from the private key and message hash. This eliminates the need for a random number generator and ensures reproducible signatures.

Parameters

xThe private key scalar.
digestThe raw hash output H(m).
qThe curve order n.
qLenThe byte length of the curve order.
qBitLenThe bit length of the curve order.
hashFactoryFactory to create hash instances for HMAC.

Returns

The deterministic nonce k in [1, q-1].