Expand description

Secp256k1-zkp

Rust bindings for libsecp256k1-zkp, a fork of Pieter Wuille’s secp256k1 library.

This library re-exports everything from secp256k1 and adds bindings for the following modules:

  • generators
  • range proofs
  • pedersen commitments

As such, it can be used as a drop-in replacement for secp256k1. All types are interoperable (as long as you are dependening on the correct version) which means SecretKeys and the Context are interoperable.

Re-exports

pub extern crate rand;
pub extern crate secp256k1_zkp_sys;
pub extern crate serde;
pub use secp256k1_zkp_sys as ffi;

Modules

Constants related to the API and the underlying curve.

Support for shared secret computations.

Structs and functionality related to the ECDSA signature algorithm.

Utilities for random number generation

schnorrsig

schnorrsigDeprecated

Schnorr Signature related methods.

secp256k1-sys FFI bindings

Serde

Structs

Represents the set of all capabilities with a user preallocated memory.

Represents all secret data involved in making a PedersenCommitment where one of the generators is blinded.

Represents an adaptor signature and dleq proof.

Represents a generator on the secp256k1 curve.

Error returned when conversion from an integer to Parity fails.

Opaque data structure that holds a keypair consisting of a secret and a public key.

A (hashed) message input to an ECDSA signature.

The result of rewinding a range proof.

Represents a commitment to a single u64 value.

A Secp256k1 public key, used for verification of signatures.

Represents a range proof.

The secp256k1 engine, used to execute all signature operations.

Secret 256-bit key used as x in an ECDSA signature.

Represents the set of capabilities needed for signing with a user preallocated memory.

Represents a surjection proof.

Represents a tag.

Represents a blinding factor/Tweak on secp256k1 curve

Represents the set of capabilities needed for verification with a user preallocated memory.

A whitelist ring signature.

An x-only public key, used for verification of Schnorr signatures and serialized according to BIP-340.

Enums

Represents the set of all capabilities.

An ECDSA error

An ECDSA error

Represents the parity passed between FFI function calls.

Represents the set of capabilities needed for signing.

An ECDSA error

Represents the set of capabilities needed for verification.

Constants

The number 1 encoded as a secret key.

The zero Tweak

Traits

A trait for all kinds of contexts that lets you define the exact flags and a function to deallocate memory. It isn’t possible to implement this for types outside this crate.

Marker trait for indicating that an instance of Secp256k1 can be used for signing.

Trait describing something that promises to be a 32-byte random number; in particular, it has negligible probability of being zero or overflowing the group order. Such objects may be converted to Messages without any error paths.

Marker trait for indicating that an instance of Secp256k1 can be used for verification.

Functions

Compute a blinding factor such that the sum of all blinding factors in both sets is equal.

Verifies that the sum of the committed values within the commitments of both sets is equal.

Type Definitions

SignatureDeprecated

backwards compatible re-export of ecdsa signatures