pycoin icon indicating copy to clipboard operation
pycoin copied to clipboard

Implement BIP0038

Open ghost opened this issue 10 years ago • 6 comments

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

ghost avatar Nov 02 '13 17:11 ghost

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.

doc-hex avatar Oct 26 '14 18:10 doc-hex

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

richardkiss avatar Oct 26 '14 19:10 richardkiss

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

scrypt==0.6.1

doc-hex avatar Oct 26 '14 19:10 doc-hex

@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.

posita avatar Apr 08 '15 22:04 posita

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

doc-hex avatar Apr 09 '15 12:04 doc-hex

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

  • pyaes
  • pythonaes (see also http://caller9.com/blog/19/full/)
  • ska (not updated for a while; related to this?)

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).

posita avatar Apr 10 '15 02:04 posita