Post
Topic
Board Bitcoin Wallet for Android
Re: Is Bitcoin Wallet for Android Hierarchical Deterministic?
by
tspacepilot
on 18/08/2016, 17:23:36 UTC
You can just use the WalletTool program from the bitcoinj source code with a wallet file.

Andreas told me he wants to be careful about exposing the seed words because it can break in various edge cases e.g. if you have an old wallet that has pre-HD keys in it and then you think all you need are the post-HD seed words. So it will take some effort and testing to get it fully right.

I know Mike is out of the scene now, but I need some help with this.  I have pulled my keys from version of the android wallet which was available in Nov 2013.  The keys when backed up came from a newer version of the android wallet in Nov 2014 and I need to get the private key for my original address that was reused a bunch before this wallet went to HD.  I have the seed which says it had a birthday on Nov 14, 2013, but after putting the seed into an HD wallet generator like the one mentioned above  (https://dcpos.github.io/bip39/) I cannot generate the same original address/key pair.  Does anyone have some clues to figure out how to get the private key for the original address?

Three keys came out in a format like this:

Keys:
addr:xxxxxx...
hash160:xxxxxx...
ECKey{pub=xxxxxx...,
priv=xxxxxx...
creationTimeSeconds=xxxxxx, isEncrypted=false, isPubKeyOnly=false}


And then this once:

Seed as words: xxxx xxxx xxxx ...
Seed as hex: xxxxxx...
Seed Birthday : xxxxxx.
Key to watch: xxxxxx...
addr: xxxxxx...
hash160:xxxxxx...



And then a few more like this:

DeterministicKey{pub=xxxxxx...,
priv=xxxxxx..., isEncrypted=false, isPubKeyOnly=true}
addr:xxxxxx...



I've also tried to used the ECKeys to generate WIF format private keys, but they do not produce the original address.

Thanks in advance!

Moreover the very first address on this decrypted list is the address I need, but like I said I could not get the ECKeys to produce the right WIF format.

I'm not sure if I understand correctly.  Is it the case that you have the public/private key pair for the addy you want?  And that your issue is just converting the format to WIF?  If so, it's not that hard, I can probably help you.  What format are the keys in now (hex, binary, decimal)?

I have a python script which takes a private key as input and produces the bitcoin addresses and WIF for the priv keys for that private key.

Yes, I have the public and private key pair written as "ECKey{pub=[key here], priv=[key here]}.  It appears to be hexadecimal.  This is straight from the instructions of extracting private keys from the Schildbach wallet key file.



We chatted a bit in PM, but it might be helpful to others to put this here.  Given the priv key in hex, you should be able to convert it to all the other formats with the 'ku'  program which is part of pycoin:

https://github.com/richardkiss/pycoin

I went through the same process you did some time ago, exporting a particular address from a wallet backup and needing the WIF in order to use it elsewhere.