At the moment you can call secp256k1_ecdsa_sign
with parameters noncefp == NULL
and noncedata != NULL
. This basically says “give me whatever function you think you should be the default but feed it this data”, which is not really meaningful. This will be relevant if we want to change the default in the future, which is not too unlikely I think.
I see two ways:
- Either we simply disallow this call (
ARG_CHECK
), or - we provide the guarantee that any default function will accept and use some (fixed-length) string of additional entropy.
After the investigation into synthetic nonces in BIP340, I slightly prefer the second option because I don’t want to discourage people from adding entropy while leaving the choice of the function to the library. What do you think?