richardkiss / pycoin

Python-based Bitcoin and alt-coin utility library.
MIT License
1.4k stars 498 forks source link

Implement BIP0038 #6

Open ghost opened 10 years ago

ghost commented 10 years ago

Please consider adding BIP0038 support:

Here is a reference implementation in Python jgarzik/python-bitcoinlib#5

which is specifically this file adding the library: https://github.com/zimage/python-bitcoinlib/blob/e9506aba6d53ad5bf760d67815d711a1c55b2557/bitcoin/bip38.py

doc-hex commented 9 years ago

I have code for this now (BIP38) and it also handles a bunch of other simpler private key formats with auto-detect. Any interest, @richardkiss? It's one file.

richardkiss commented 9 years ago

Sure, do a pull request. Is it pure python?

doc-hex commented 9 years ago

Yes, pure python, but requires "scrypt" module.

scrypt==0.6.1

posita commented 9 years ago

@peter-conalgo, were you ever able to submit a PR for this? If not, please let me know if I can be of any assistance. I would love to see this feature added as well.

doc-hex commented 9 years ago

Never made a PR for this no, so I'm going to have another coder here look at doing this shortly.

posita commented 9 years ago

If you need a pure Python AES implementation, I've found a few, but haven't explored any of them in detail:

I'm assuming based on @richardkiss's question that creating a dependency on pyopenssl or cryptography (like /zimage/python-bitcoinlib/.../bitcoin/bip38.py uses) is less than ideal...?

Also, it might be too new, but as of Python 2.7.8 and 3.4, the hashlib standard module has a PBKDF2 implementation. Otherwise, there's an external pure Python library (which is also used by Trezor's BIP0032 implementation).