Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Updated code. #5

Closed
wants to merge 21 commits into from
Closed

Updated code. #5

wants to merge 21 commits into from

Conversation

zimage
Copy link

@zimage zimage commented May 15, 2013

  • added unit tests for CKey
  • added get_secret() and get_compressed() methods to CKey
  • added constant to base58.py for private keys (wallet import format)

@jgarzik
Copy link
Owner

jgarzik commented May 15, 2013

Overall impression: positive, would like to merge, have questions.

@zimage
Copy link
Author

zimage commented May 15, 2013

oops. forgot to mention that in my commit. python3 doesn't have encode/decode, but does have hexilify. This change bled over from my debugging libssl problems on my mac. I thought python3 might make the get_secret code and generate(secret=) code work instead of segfaulting. It works on my linux box, though.

Test vectors come from the BIP
encryption with no compression and no ec multiply code works. encryption with compression does not
@ghost
Copy link

ghost commented Nov 2, 2013

Any update on this PR? BIP38 is really important...

Replaced encode('hex') with binascii.hexlify for python3 compatibility
Added a constant to the base58 code for the private key version number
Test vectors come from the BIP
encryption with no compression and no ec multiply code works. encryption with compression does not
hex to WIF now uses CKey.get_secret(form=CKeyForm.BASE58)) instead of doing it manually.
Added decryption test code for non-EC Multiply encryption
Conflicts:
	bitcoin/bip38.py
	bitcoin/tests/test_bip38.py
@zimage zimage closed this Nov 10, 2013
@ghost
Copy link

ghost commented Nov 10, 2013

Why did you close this pr?

@zimage
Copy link
Author

zimage commented Nov 10, 2013

My git skills are lacking. I was having a hard time merging the upstream changes into my fork, so I made a new fork from jgarzik's master and am merging in my changes. It's been 6 months since I did any bitcoin crypto code, so the finishing touches have been pretty slow-going. I have the non-EC-Multiply encrypt/decrypt working, and EC-multiply make-intermediate and decrypt are done. I'm still hunting down why my EC-Multiply encrypt isn't correct. Then I'll have to add the confirmation code generation.

@ghost
Copy link

ghost commented Nov 10, 2013

OK that's good to know another PR is coming. Just FYI @jgarzik is waiting on some pythonize stuff from @petertodd - if you need any help (with git) for example, give me a shout, and many thanks for working on this important addition to the bitcoin library.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants