split signing into ecdsa_sign_digest and ecdsa_sign/ecdsa_sign_double