--- id: coincurve version: "21.0.0" license: MIT OR Apache-2.0 license_treatment: permissive maintenance: active --- # coincurve — Safest and fastest Python library for secp256k1 elliptic curve operations License: permissive · Maintenance: active · Downloads: 3.3M/mo ## What it is and what it does coincurve wraps libsecp256k1, the heavily optimized C library used by Bitcoin Core, to provide Python developers with fast, production-grade elliptic curve operations on the secp256k1 curve. It handles ECDSA signing and verification, ECDH key exchange, and Schnorr signatures—the cryptographic primitives underlying blockchain systems. The package is used by major projects including Ethereum, LBRY, and libp2p. It supports Python 3.9 through 3.13 and both CPython and PyPy implementations. Installation is straightforward on common platforms thanks to prebuilt wheels; on less common architectures, you may need a C compiler and libsecp256k1 development headers. Use it for: - Sign and verify transactions in Bitcoin or Ethereum applications without implementing elliptic curve math yourself. - Perform ECDH key exchange for establishing shared secrets in peer-to-peer or blockchain protocols. - Generate and manage secp256k1 keypairs for cryptocurrency wallets or signing services. - Implement Schnorr signatures for protocols that require this signature scheme. - Integrate cryptographic operations into applications that depend on libsecp256k1 semantics. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. coincurve provides Python bindings to libsecp256k1, enabling fast elliptic curve cryptography operations on the secp256k1 curve used by Bitcoin and Ethereum. Yes. coincurve is production-stable, actively maintained, widely adopted in blockchain infrastructure, has no known vulnerabilities, and offers fast Python bindings to secp256k1. Install it if you need secp256k1 operations; the medium install friction is justified by the performance and correctness guarantees of the underlying C library. ## Install pip install coincurve uv add coincurve poetry add coincurve ## Installing coincurve Before you install: Medium install friction due to compiled C bindings; prebuilt wheels are available for Python 3.9–3.13 across macOS, Linux, and Windows architectures, reducing build overhead on common platforms. License in practice: Dual-licensed under MIT or Apache-2.0, both permissive licenses; you may choose either license when using or redistributing the package. Quickstart: pip install coincurve from coincurve import PrivateKey private_key = PrivateKey() public_key = private_key.public_key signature = private_key.sign(b'message') Requires Python 3.9 or later; on platforms without prebuilt wheels, a C compiler and libsecp256k1 development headers are needed. Verify before relying: - Whether the package supports key derivation (BIP32/BIP44) or only basic signing and verification operations. - Performance characteristics compared to pure-Python elliptic curve libraries for typical workloads. - Full API surface for ECDH, Schnorr signatures, and other operations beyond basic signing. ## Package facts - License: MIT OR Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 3.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags secp256k1 python bindings, elliptic curve cryptography library, bitcoin ethereum signing, ecdsa ecdh operations, libsecp256k1 wrapper, elliptic-curve, blockchain, cryptography [View on SkillFed](https://skillfed.io/packages/coincurve) · [View on PyPI](https://pypi.org/project/coincurve/)