A Python library for 'bitcoin cryptography'

btclib is a Python3 type annotated library intended for teaching, learning, and using bitcoin, its blockchain, and the associated elliptic curve cryptography.

It is rigorously and extensively tested: the test suite covers 100% of the code base and reproduces results from both informal and major reference sources.

Originally developed for the Bitcoin and Blockchain Technology course at the University of Milano-Bicocca, btclib is not intended for production environments: it is often refactored for improved clarity, without care for backward compatibility; moreover, some of its algorithms could be broken using side-channel attacks.


Build Status ReadtheDocs Coverage Status PyPI status PyPI pyversions PyPI version GitHub License

btclib does not have external requirements or dependencies; to install (and/or upgrade) it:

python -m pip install --upgrade btclib

Included features are: