Affects the draft BIP 0327.
This is not ready for merging yet; we would still need to update the reference implementation and test vectors to match. I’m opening this PR as a suggestion to get consensus before going to such effort.
The secret nonces $k_1$ and $k_2$ are currently generated by reducing $H(…) \mod n$ and failing if the result is zero.
We could instead reduce them to a non-zero scalar in $[1, n)$ every time by reducing mod $n-1$ and incrementing.