Bitcoin Forum
May 08, 2024, 12:35:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: Yet Another Python BIP32 implementation on: March 06, 2014, 09:19:54 AM
I've decided to go ahead and put it up on PyPI, as I'm reasonably sure it's working correctly given the number of tests: https://pypi.python.org/pypi/bitmerchant

If anybody runs into problems please open a ticket at https://github.com/sbuss/bitmerchant/issues
2  Bitcoin / Development & Technical Discussion / Yet Another Python BIP32 implementation on: March 05, 2014, 07:07:00 AM
I have implemented BIP32 in python over the past four weeks or so in a library I'm calling bitmerchant.

https://github.com/sbuss/bitmerchant

Please note that this is not on PyPI yet because, even though the tests are passing, I wanted to get some eyes on it to check for any obvious cryptobugs I overlooked. I'm using the python-ecdsa library (https://pypi.python.org/pypi/ecdsa) for EC keys and pyCrypto.random (a hardened prng in place of python's insecure random library) in the one place I generate a random 512 bit key.

My goal is to implement commonly needed methods for merchants that want to accept bitcoin or some altcoin without depending on outside services to host their wallet, all while providing good security by default.

BIP32 was the first feature I tackled because a merchant only needs a single public master key to start accepting coins immediately into user-specific wallets. I wrote this because I wanted to do this exact thing in a side project without relying on outside services but wasn't happy with the available libraries (due to code quality, lack of tests, or complexity).

I tried to make the documentation easy to follow for people unfamiliar with bitcoin. I drew attention to the various security concerns that new users (and even experienced users) may not be aware of (in particular the ability to recover a master private key given a master public key and one of its private children). There's a lot of prose in the readme, but it's supplemented quite well with code samples. My code is full of docstrings, hopefully has a sane structure, and goes through pyflakes/pep8 to ensure a consistent style.

This library is tested via TravisCI on python 2.6, 2.7, and 3.3. It currently has 96% test coverage and includes test vectors from the bitcoin source.

Many thanks to https://github.com/wink/money-tree for its great documentation that helped clear up some vague parts of the BIP32 spec.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!