# bitcoin-core/secp256k1

Optimized C library for EC operations on curve secp256k1

Repository: https://github.com/bitcoin-core/secp256k1
Canonical: https://ross.abutalabs.com/products/secp256k1
Language: C
License: MIT
License Family: permissive
Last push: 2026-08-25T06:51:20+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 64, longevity 100
- inputs: {"age_days": 4589, "days_push": 8, "days_rel": 30, "gap_med": 189, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2477, forks 1165 (observed 2026-08-28T04:06:55.109663+00:00)

## What it is
libsecp256k1 is a high-performance, high-assurance C library for elliptic curve cryptography on the secp256k1 curve, including ECDSA and Schnorr signatures, key generation, and ECDH. It was developed primarily for Bitcoin Core but is usable in any application needing secp256k1 operations, with constant-time implementations and no runtime dependencies.

## Use cases
- sign and verify bitcoin transactions with ecdsa
- generate secp256k1 key pairs in c
- implement bip-340 schnorr signatures
- perform ecdh key exchange on secp256k1
- recover public keys from signatures
- build a crypto wallet with fast signature verification
- constant-time signing to prevent side-channel attacks
- use secp256k1 on embedded systems without heap allocation

## When to choose
- you need fast, audited secp256k1 ECDSA or Schnorr signing and verification
- you are building bitcoin or other cryptocurrency software
- you need constant-time, side-channel resistant cryptography in C
- you need a dependency-free library suitable for embedded or constrained environments
- you need BIP-340/324/327/352 features like MuSig2 or Silent Payments

## When to avoid
- you need curves other than secp256k1 (use libsodium or OpenSSL)
- you want a high-level, hard-to-misuse crypto API for general TLS or encryption
- your use case differs significantly from Bitcoin's and you need a heavily verified interface for it
- you need a managed-language library without C bindings

## Facets
- artifact type: library
- maturity: stable
- function: cryptography, serialization, sdk
- domain: blockchain, security, developer-tools
- platform: cross-platform, embedded, windows, cpp
- tags: secp256k1, ecdsa, schnorr-signatures, elliptic-curve, bitcoin, constant-time, digital-signatures, ecdh, musig2, c89, cryptocurrency, linux, macos

## Member repositories
- bitcoin-core/secp256k1 (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:55.109663+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:28:19.500130+00:00, confidence not recorded.
  - readme: https://github.com/bitcoin-core/secp256k1 (fetched 2026-08-28T04:06:55.109663+00:00, sha 2b9b1cb47eeb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
