Skip to main content

Cross-platform Python libsecp256k1 for ElectrumSV

Project description

Licence: MIT Licence / Apache v2.0 (dual licensed)
Maintainers: Neil Booth, Roger Taylor
Project Lead: Roger Taylor
Language: Python (>=3.6)

Build status on Azure Pipelines

This library provides a wrapped pre-compiled libsecp256k1, the heavily optimized C library used by Bitcoin Core for operations on elliptic curve secp256k1. It effectively encapsulates a libsecp256k1 fork and allows ElectrumSV developers to have a vetted build, with selected public modifications, available on pypi to treat as a first classed dependency which can be obtained and verified against a known hash, like any other Python dependency.

Table of Contents

<nav class="contents local" id="contents"> </nav>


  • Linux, macOS, and Windows all have binary packages for 64 bit architectures only.

  • Linux & macOS use GMP for faster computation

  • Implements a fix for to support Python 3.6+ on macOS


electrumsv-secp256k1 is distributed on PyPI and is available on Linux/macOS and Windows and supports Python 3.6 and Python 3.7.

$ pip install electrumsv-secp256k1

If you are on a system that doesn’t have a precompiled binary wheel (e.g. FreeBSD) then pip will fetch source to build yourself. You must have the necessary packages.

On Debian/Ubuntu for example the necessary packages are:

  • build-essential

  • automake

  • pkg-config

  • libtool

  • libgmp-dev (optional)


Anything importing this should be familiar with the underlying libsecp256k1 api.


  • Contributors of coincurve. At this time this project is for the most part a adapted and stripped down version of coincurve for Azure Pipelines.

  • Contributors of libsecp256k1.

  • Contributors of secp256k1-py. While Coincurve is nearly a complete rewrite, much of the build system provided by ulope remains.


Coincurve history available here.

Project details

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page