pub struct Secp256k1<C> { /* fields omitted */ }
The secp256k1 engine, used to execute all signature operations
Creates a new Secp256k1 context with all capabilities
Creates a new Secp256k1 context that can only be used for signing
Creates a new Secp256k1 context that can only be used for verification
(Re)randomizes the Secp256k1 context for cheap sidechannel resistance;
see comment in libsecp256k1 commit d2275795f by Gregory Maxwell. Requires
compilation with "rand" feature.
Constructs a signature for msg
using the secret key sk
and RFC6979 nonce
Requires a signing-capable context.
Constructs a signature for msg
using the secret key sk
and RFC6979 nonce
Requires a signing-capable context.
Generates a random keypair. Convenience function for key::SecretKey::new
and key::PublicKey::from_secret_key
; call those functions directly for
batch key generation. Requires a signing-capable context. Requires compilation
with the "rand" feature.
Determines the public key for which sig
is a valid signature for
msg
. Requires a verify-capable context.
Checks that sig
is a valid ECDSA signature for msg
using the public
key pubkey
. Returns Ok(true)
on success. Note that this function cannot
be used for Bitcoin consensus checking since there may exist signatures
which OpenSSL would verify but not libsecp256k1, or vice-versa. Requires a
verify-capable context.
Executes the destructor for this type. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static