Expand description
§FFI bindings
Direct bindings to the underlying C library functions. These should not be needed for most users.
Structs§
- Context
- A Secp256k1 context, containing various precomputed values and such
needed to do elliptic curve computations. If you create one of these
with
secp256k1_context_create
you MUST destroy it withsecp256k1_context_destroy
, or else you will have a memory leak. - Public
Key - Library-internal representation of a Secp256k1 public key
- Recoverable
Signature - Library-internal representation of a Secp256k1 signature + recovery ID
- Shared
Secret - Library-internal representation of an ECDH shared secret
- Signature
- Library-internal representation of a Secp256k1 signature
Constants§
- SECP256
K1_ SER_ COMPRESSED - Flag for keys to indicate compressed serialization format
- SECP256
K1_ SER_ UNCOMPRESSED - Flag for keys to indicate uncompressed serialization format
- SECP256
K1_ START_ NONE - Flag for context to enable no precomputation
- SECP256
K1_ START_ SIGN - Flag for context to enable signing precomputation
- SECP256
K1_ START_ VERIFY - Flag for context to enable verification precomputation
Statics§
Functions§
- ecdsa_
signature_ ⚠parse_ der_ lax - secp256k1_
context_ ⚠clone - secp256k1_
context_ ⚠create - secp256k1_
context_ ⚠destroy - secp256k1_
context_ ⚠randomize - secp256k1_
ec_ ⚠privkey_ tweak_ add - secp256k1_
ec_ ⚠privkey_ tweak_ mul - secp256k1_
ec_ ⚠pubkey_ combine - secp256k1_
ec_ ⚠pubkey_ create - secp256k1_
ec_ ⚠pubkey_ parse - secp256k1_
ec_ ⚠pubkey_ serialize - secp256k1_
ec_ ⚠pubkey_ tweak_ add - secp256k1_
ec_ ⚠pubkey_ tweak_ mul - secp256k1_
ec_ ⚠seckey_ verify - secp256k1_
ecdh ⚠ - secp256k1_
ecdsa_ ⚠recover - secp256k1_
ecdsa_ ⚠recoverable_ signature_ convert - secp256k1_
ecdsa_ ⚠recoverable_ signature_ parse_ compact - secp256k1_
ecdsa_ ⚠recoverable_ signature_ serialize_ compact - secp256k1_
ecdsa_ ⚠sign - secp256k1_
ecdsa_ ⚠sign_ recoverable - secp256k1_
ecdsa_ ⚠signature_ normalize - secp256k1_
ecdsa_ ⚠signature_ parse_ compact - secp256k1_
ecdsa_ ⚠signature_ parse_ der - secp256k1_
ecdsa_ ⚠signature_ serialize_ compact - secp256k1_
ecdsa_ ⚠signature_ serialize_ der - secp256k1_
ecdsa_ ⚠verify - secp256k1_
schnorr_ ⚠recover - secp256k1_
schnorr_ ⚠sign - secp256k1_
schnorr_ ⚠verify
Type Aliases§
- NonceFn
- A nonce generation function. Ordinary users of the library never need to see this type; only if you need to control nonce generation do you need to use it. I have deliberately made this hard to do: you have to write your own wrapper around the FFI functions to use it. And it’s an unsafe type. Nonces are generated deterministically by RFC6979 by default; there should be no need to ever change this.