This is a work in progress because I wanted to put this up for discussion before writing tests. It addresses the TODOs that didn’t make it in the schnorrsig PR and changes the APIs of schnorrsig_sign
, schnorrsig_verify
and hardened_nonce_function
.
- Ideally, the new
aux_rand32
argument forsign
would be const, but didn’t find a solution I was happy with. - Support for variable length message signing and verification supports the suggested BIP amendment for such messages.
(EDIT: see below)sign_custom
with its opaque config object allows adding more arguments later without having to change the API again. Perhaps there are other sensible customization options, but I’m thinking of sign-to-contract/covert-channel in particular. It would require adding the fieldsunsigned char *s2c_data32
andsecp256k1_s2c_opening *s2c_opening
to the config struct. The former is the data to commit to and the latter is written to bysign_custom
.