Given a fixed hash value (h) and private key (p), is it possible to find a nonce (k) that fits the following equation in ECC mathematics?

158 Views Asked by At

Assuming secp256k1 curve and ECDSA parameters, I'm trying to see if there's a way to solve for $k$, where:

$k = {-h\over r} -p$, where $k$ is the ECDSA nonce, $p$ is the private key, $h$ is the hash and $r$ is the $x$ coordinate of $kG$. In other words, the private key and hash are fixed, and I want to find any $k$ value that will satisfy that equation.

It can be rewritten as $(k+p) ((kG).x) = -h$.

Over a very small field, you can just iterate through all values for $k$ up to the group order, which I've tried. About 35% of the time there is no solution. Am I missing some straightforward analytic solution, or is this as hard as the discrete log problem?