Type Alias secp256k1_sys::SchnorrNonceFn

source ·
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 secp256k1_nonce function with the exception of accepting an additional pubkey argument and not requiring an attempt argument. The pubkey argument can protect signature schemes with key-prefixed challenge hash inputs against reusing the nonce when signing with the wrong precomputed pubkey.

Aliased Type§

enum SchnorrNonceFn {
    None,
    Some(unsafe extern "C" fn(_: *mut u8, _: *const u8, _: usize, _: *const u8, _: *const u8, _: *const u8, _: usize, _: *mut c_void) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut u8, _: *const u8, _: usize, _: *const u8, _: *const u8, _: *const u8, _: usize, _: *mut c_void) -> i32)

Some value of type T.

Trait Implementations§

source§

impl<T: CPtr> CPtr for Option<T>

§

type Target = <T as CPtr>::Target

source§

fn as_mut_c_ptr(&mut self) -> *mut Self::Target

source§

fn as_c_ptr(&self) -> *const Self::Target