{"id":14980233,"url":"https://github.com/arctictechnology/libsecp256k1-0","last_synced_at":"2025-10-28T23:31:23.903Z","repository":{"id":62575941,"uuid":"449567899","full_name":"ArcticTechnology/libsecp256k1-0","owner":"ArcticTechnology","description":"Compiled libsecp256k1 for using ECDSA signatures and secret/public key cryptography in your python projects.","archived":false,"fork":false,"pushed_at":"2023-02-21T03:58:10.000Z","size":1616,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T19:39:14.950Z","etag":null,"topics":["bitcoin","bitcoin-core","bitcoin-wallet","crypto","cryptography","ecdsa","ecdsa-cryptography","libsecp256k1","python","secp256k1"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArcticTechnology.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-19T06:05:35.000Z","updated_at":"2024-10-20T16:33:54.000Z","dependencies_parsed_at":"2022-11-03T17:45:11.858Z","dependency_job_id":null,"html_url":"https://github.com/ArcticTechnology/libsecp256k1-0","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcticTechnology%2Flibsecp256k1-0","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcticTechnology%2Flibsecp256k1-0/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcticTechnology%2Flibsecp256k1-0/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcticTechnology%2Flibsecp256k1-0/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArcticTechnology","download_url":"https://codeload.github.com/ArcticTechnology/libsecp256k1-0/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238738001,"owners_count":19522288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","bitcoin-core","bitcoin-wallet","crypto","cryptography","ecdsa","ecdsa-cryptography","libsecp256k1","python","secp256k1"],"created_at":"2024-09-24T14:01:29.424Z","updated_at":"2025-10-28T23:31:18.473Z","avatar_url":"https://github.com/ArcticTechnology.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Libsecp256k1-0\n\nThis is a compiled libsecp256k1 python package that allows you to use secp256k1 in your python projects. Secp256k1 is an optimized C library for ECDSA signatures and secret/public key operations. This library is intended to be the highest quality publicly available library for cryptography on the secp256k1 curve. See this for more details on secp256k1: https://github.com/bitcoin-core/secp256k1. Libsecp256k1-0 contains the precompiled modules of secp256k1 compatible for multiple platforms (unix, windows 32 and 64 bits). Most importantly, you can use the dockerized compiler in this package to compile these modules directly from source. That way you don't need to put your trust the precompiled versions in this package or anyone else's versions of libsecp256k1.\n* Github repo: https://github.com/ArcticTechnology/libsecp256k1-0\n* PyPi: https://pypi.org/project/libsecp256k1-0/\n\n## Prerequisites\n* Python3 (version \u003e= 3.10) - Install Python3 here: https://www.python.org/downloads/. Check version with: ```python3 --version```\n* Pip3 (version \u003e= 23.0) - Python3 should come with pip3. Check version with: ```pip3 --version```\n* Docker (version \u003e= 20.10.7) - Docker is only required if you wish to use the compiler in this package to compile libsecp256k1 for yourself.\n* Linux or Windows - This application works out of the box for Linux and is compatible with Windows.\n* MacOS - This application works for MacOS using the precompiled binary that comes with the app. However, this app is not able compile a new binary for MacOS. If you wish to compile your own, the Electrum wallet has a compiler that can be used. The simpliest way is to install the Electrum wallet and access the ```libsecp256k1.0.dylib``` binary file located in the app: ```~/Applications/Electrum.app/Contents/MacOS/libsecp256k1.0.dylib```. Then replace the ```../compiled/darwin/libsecp256k1.0.dylib``` file with your new binary.\n\n## Installation\nThere are a couple of options to install this package:\n* Pip Install - This package is hosted on PyPi and can be installed with the following command:\n```\npip3 install libsecp256k1-0\n```\n* Local Install - Alternatively, you can download or git clone the Github repo and install it locally with the following:\n```\ngit clone https://github.com/ArcticTechnology/libsecp256k1-0.git\ncd libsecp256k1-0\npip3 install -e .\n```\nTo uninstall this app:\n```\npip3 uninstall libsecp256k1-0\n```\n* If you used the local install option, you will also want to delete the ```.egg-info``` file located in the ```src/``` directory of the package. This gets created automatically with ```pip3 install -e .```.\n\n## Usage\nAfter installation, you can simply import the package resources and use them in your own project:\n```\nfrom libsecp256k1_0 import *\n```\nOnce imported, you should be able to all the modules in the package. For example, this is how you verify ecdsa with secp256k1:\n```\nSecp256k1._libsecp256k1.secp256k1_ecdsa_verify(\u003cctx\u003e, \u003csig\u003e, \u003cmsg_hash\u003e, \u003cpubkey\u003e)\n```\n\n## Compile\nYou can use the dockerized compiler of this package to compile libsecp256k1 for yourself. The compiler builds directly from this source: https://github.com/bitcoin-core/secp256k1.git. It is recommended that you build libsecp256k1 for yourself that way you don't need to put your trust the precompiled versions in this package or any other versions of libsecp256k1. By default, running the compiler will overwrite the precompiled modules with the newly compiled ones. In order to use the compiler you will need to have Docker (version \u003e= 20.10.7), see \"Instructions for Docker\" section for more details.\n\nThere are a couple ways you can run the compiler:\n* Simply use the following command in Docker:\n```\nlibsecp-compile\n```\n* You can also run it with the python command ```python3 -m```:\n```\npython3 -m libsecp-compile\n```\n* You can also access the compiler in the package resources. Here you have the option to specify where you want the compiled files to output to.\n```\nfrom libsecp256k1_0 import Libsecp256k1\nLibsecp256k1.docker_compile(outpath='/home/example')\n```\n* You can also run the compiler from a Linux terminal without Docker by calling the \"local_compiler.sh\" file. This will automatically compile to your working directory.\n```\n./local_compiler.sh\n```\n\n## Troubleshooting\nThis section goes over some of the common issues found and how to resolve them.\n\n### \"Command Not Found\" Error When Running the Compiler\nOn Linux, if you are getting a ```command not found``` error when trying to run the compiler, you may need to add ```~/.local/bin/``` to PATH. See this thread for details: https://stackoverflow.com/a/34947489. To add ```~/.local/bin/``` to PATH do the following:\n\n1. Add ```export PATH=~/.local/bin:$PATH``` to ```~/.bash_profile```.\n```\necho export PATH=~/.local/bin:$PATH \u003e ~/.bash_profile\n```\n2. Execute command.\n```\nsource ~/.bash_profile\n```\n\n### Instructions for Docker\n1. To install Docker, use the following command:\n```\nsudo apt-get update\nsudo apt install docker.io\nsudo docker version\n```\n2. Make sure you are able to run docker will the following command:\n```\nsudo docker run --name test-docker-instance test-docker\nsudo docker images\n```\n3. To remove the docker image use:\n```\nsudo docker stop test-docker-instance\nsudo docker kill --signal=9 test-docker-instance\nsudo docker rmi test-docker\n```\n\n## Support and Contributions\nOur software is open source and free for public use. If you found any of these repos useful and would like to support this project financially, feel free to donate to our bitcoin address.\n\nBitcoin Address 1: 1GZQY6hMwszqxCmbC6uGxkyD5HKPhK1Pmf\n\n![alt text](https://github.com/ArcticTechnology/BitcoinAddresses/blob/main/btcaddr1.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farctictechnology%2Flibsecp256k1-0","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farctictechnology%2Flibsecp256k1-0","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farctictechnology%2Flibsecp256k1-0/lists"}