Crate secp256k1_sys
source ·Expand description
§secp256k1-sys FFI bindings
Direct bindings to the underlying C library functions. These should not be needed for most users.
Modules§
- recovery
recovery
FFI of the recovery module
Macros§
- Implement methods and traits for types that contain an inner array.
Structs§
- 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. - Library-internal representation of a ElligatorSwift encoded group element.
- Library-internal representation of a Secp256k1 public key
- Data structure that contains additional arguments for schnorrsig_sign_custom.
- Library-internal representation of a Secp256k1 signature
Constants§
- Flag for keys to indicate compressed serialization format
- Flag for keys to indicate uncompressed serialization format
- Flag for context to enable no precomputation
- Flag for context to enable signing precomputation
- Flag for context to enable verification precomputation
Statics§
- Default ECDH hash function
- Default ECDH hash function for BIP324 key establishment
Traits§
- A trait for producing pointers that will always be valid in C (assuming NULL pointer is a valid no-op).
Functions§
- Does a best attempt at secure erasure using Rust intrinsics.
- rustsecp256k1_
v0_ ⚠10_ 0_ context_ create alloc
and non-rust_secp_no_symbol_renaming
A reimplementation of the C functionsecp256k1_context_create
in rust. - rustsecp256k1_
v0_ ⚠10_ 0_ context_ destroy alloc
and non-rust_secp_no_symbol_renaming
- rustsecp256k1_
v0_ ⚠10_ 0_ default_ error_ callback_ fn Non- rust_secp_no_symbol_renaming
This function is an override for the C function, this is the an edited version of the original description: - rustsecp256k1_
v0_ ⚠10_ 0_ default_ illegal_ callback_ fn Non- rust_secp_no_symbol_renaming
This function is an override for the C function, this is the an edited version of the original description: - secp256k1_
context_ ⚠create alloc
and non-rust_secp_no_symbol_renaming
A reimplementation of the C functionsecp256k1_context_create
in rust. - secp256k1_
context_ ⚠destroy alloc
and non-rust_secp_no_symbol_renaming
A reimplementation of the C functionsecp256k1_context_destroy
in rust. - secp256k1_
context_ ⚠preallocated_ clone Non- secp256k1_fuzz
- secp256k1_
context_ ⚠preallocated_ clone_ size Non- secp256k1_fuzz
- secp256k1_
context_ ⚠preallocated_ create Non- secp256k1_fuzz
- secp256k1_
context_ ⚠preallocated_ size Non- secp256k1_fuzz
- secp256k1_
context_ ⚠randomize Non- secp256k1_fuzz
- secp256k1_
ec_ ⚠pubkey_ cmp Non- secp256k1_fuzz
- secp256k1_
ec_ ⚠pubkey_ combine Non- secp256k1_fuzz
- secp256k1_
ec_ ⚠pubkey_ create Non- secp256k1_fuzz
- secp256k1_
ec_ ⚠pubkey_ negate Non- secp256k1_fuzz
- secp256k1_
ec_ ⚠pubkey_ parse Non- secp256k1_fuzz
- secp256k1_
ec_ ⚠pubkey_ serialize Non- secp256k1_fuzz
- secp256k1_
ec_ ⚠pubkey_ tweak_ add Non- secp256k1_fuzz
- secp256k1_
ec_ ⚠pubkey_ tweak_ mul Non- secp256k1_fuzz
- secp256k1_
ecdh ⚠Non- secp256k1_fuzz
- secp256k1_
ecdsa_ ⚠sign Non- secp256k1_fuzz
- secp256k1_
ecdsa_ ⚠verify Non- secp256k1_fuzz
- secp256k1_
keypair_ ⚠create Non- secp256k1_fuzz
- secp256k1_
keypair_ ⚠xonly_ pub Non- secp256k1_fuzz
- secp256k1_
keypair_ ⚠xonly_ tweak_ add Non- secp256k1_fuzz
- secp256k1_
schnorrsig_ ⚠sign Non- secp256k1_fuzz
- secp256k1_
schnorrsig_ ⚠sign_ custom Non- secp256k1_fuzz
- secp256k1_
schnorrsig_ ⚠verify Non- secp256k1_fuzz
- secp256k1_
xonly_ ⚠pubkey_ cmp Non- secp256k1_fuzz
- secp256k1_
xonly_ ⚠pubkey_ from_ pubkey Non- secp256k1_fuzz
- secp256k1_
xonly_ ⚠pubkey_ parse Non- secp256k1_fuzz
- secp256k1_
xonly_ ⚠pubkey_ serialize Non- secp256k1_fuzz
- secp256k1_
xonly_ ⚠pubkey_ tweak_ add Non- secp256k1_fuzz
- secp256k1_
xonly_ ⚠pubkey_ tweak_ add_ check Non- secp256k1_fuzz
Type Aliases§
- Hash function to use to post-process an ECDH point to get a shared secret.
- A hash function used by
ellswift_ecdh
to hash the final ECDH shared secret. - 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.
- 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.