Skip to main content

secp256k1 wrapped with cffi to use with python

Project description

Bitcoin secp256k1 C library wrapped with CFFI to use with Python2 and PyPy2.

Benchmarks

These results are achieved on an Intel Core i5-4200U CPU @ 1.6GHz:

cffi took: 0.75secs / 74μs per op  / 13391 signs per sec

cffi took: 1.09secs / 109μs per op  / 9170 recovers per sec

Usage

This library offers sign and recover from the secp256k1 bitcoin lib used like this:

sig = secp256k1_ecdsa_sign(msg32, seckey)

pubkey = secp256k1_ecdsa_recover(msg32, sig)

Installation

Clone repo:

git clone https://github.com/czepluch/pysecp256k1.git

Development

To install:

python setup.py develop

Install

To install package:

python setup.py install

Test

To test and install test dependenceis:

python setup.py test

Generate source & binary pakacages

To generate installable source and binary packages:

python setup.py sdist bdist_wheel

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

c_secp256k1-0.0.6.tar.gz (113.0 kB view details)

Uploaded Source

Built Distribution

c_secp256k1-0.0.6-cp27-none-macosx_10_10_x86_64.whl (111.6 kB view details)

Uploaded CPython 2.7 macOS 10.10+ x86-64

File details

Details for the file c_secp256k1-0.0.6.tar.gz.

File metadata

  • Download URL: c_secp256k1-0.0.6.tar.gz
  • Upload date:
  • Size: 113.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for c_secp256k1-0.0.6.tar.gz
Algorithm Hash digest
SHA256 cc984297a7f88662e0c6549945fc66135c0734d09035406c391c45dcbcc9aaeb
MD5 a771651a2ede4c0961e16820037a0743
BLAKE2b-256 3ce163c755c12a975a36b6171bba90dfe977aa62661ae762c59ac967a66d80f6

See more details on using hashes here.

File details

Details for the file c_secp256k1-0.0.6-cp27-none-macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for c_secp256k1-0.0.6-cp27-none-macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 0db7e5cdcd0000de712b0b354e6b904cb63f46ea5290a9b1d0bb55912afd6aa6
MD5 a5167e9b7b261636455ee911ce17c7f9
BLAKE2b-256 edca2dc27dcb81553fdfb968dfdc39235cf98592a35a0802b2c3d2ce6be42d50

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page