pub type SchnorrNonceFn = Option<unsafe extern "C" fn(nonce32: *mut c_uchar, msg32: *const c_uchar, msg_len: size_t, key32: *const c_uchar, xonly_pk32: *const c_uchar, algo16: *const c_uchar, algo_len: size_t, data: *mut c_void) -> c_int>;Expand description
Same as NonceFn, but accepts an additional pubkey argument and does not
accept an attempt argument.
The pubkey argument will protect signature schemes with tweaked keys from reusing the nonce when signing with a different precomputed pubkey, which for BIP 340 signatures is just as bad as reusing a nonce across different messages.
As with NonceFn ordinary users should never need to touch this type.
Aliased Type§
pub enum SchnorrNonceFn {
None,
Some(unsafe extern "C" fn(*mut u8, *const u8, usize, *const u8, *const u8, *const u8, usize, *mut c_void) -> i32),
}