Bitcoin Forum

Bitcoin => Bitcoin Wallet for Android => Topic started by: BusyBeaverHP on December 11, 2014, 09:06:09 AM



Title: Is Bitcoin Wallet for Android Hierarchical Deterministic?
Post by: BusyBeaverHP on December 11, 2014, 09:06:09 AM
Just wondering if Bitcoin Wallet for Android is Hierarchical Deterministic or not.
It's not completely obvious to me since it doesn't offer seed backup.

If it isn't HD, what are its methods of private key generation?

Thanks ahead of time.


Title: Re: Is Bitcoin Wallet for Android Hierarchical Deterministic?
Post by: Mike Hearn on December 11, 2014, 01:07:22 PM
Yes it is since v4.0.

I think Andreas will expose the seed words at some point. Not sure what the delay is.


Title: Re: Is Bitcoin Wallet for Android Hierarchical Deterministic?
Post by: BusyBeaverHP on December 12, 2014, 12:04:59 AM
Thanks for clearing that up.


Title: Re: Is Bitcoin Wallet for Android Hierarchical Deterministic?
Post by: luv2drnkbr on December 18, 2014, 05:46:16 PM
Yes it is since v4.0.

I think Andreas will expose the seed words at some point. Not sure what the delay is.

Is there *any* method of getting at the seed from the application's data files?  I don't want to use it unless I've backed up the seed myself, and currently I don't know how to do that.


Title: Re: Is Bitcoin Wallet for Android Hierarchical Deterministic?
Post by: btchris on December 19, 2014, 10:36:36 PM
Yes it is since v4.0.

I think Andreas will expose the seed words at some point. Not sure what the delay is.

Is there *any* method of getting at the seed from the application's data files?  I don't want to use it unless I've backed up the seed myself, and currently I don't know how to do that.

I went ahead and wrote a python script which can extract the seed from either a backup file or from the raw wallet file (which you can only get to if your phone is rooted). Feel free to give it a try, instructions and download links are at GitHub: https://github.com/gurnec/decrypt_bitcoinj_seed (https://github.com/gurnec/decrypt_bitcoinj_seed). You'll of course need your backup password (if it's a wallet backup file) and your PIN, if any.

I've verified that the seed I get from the script can be used to generate the same sequence of addresses/keys as are in the app (I just went here (https://dcpos.github.io/bip39/) and plugged in my seed -- obviously if you choose to do something similar with anything but a test seed, you should use an offline copy of that page).


Title: Re: Is Bitcoin Wallet for Android Hierarchical Deterministic?
Post by: luv2drnkbr on December 21, 2014, 07:42:51 PM
Thanks man, I appreciate that!


Title: Re: Is Bitcoin Wallet for Android Hierarchical Deterministic?
Post by: Mike Hearn on December 22, 2014, 06:41:46 PM
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.


Title: Re: Is Bitcoin Wallet for Android Hierarchical Deterministic?
Post by: Andaloons on August 16, 2016, 11:30:53 AM
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!


Title: Re: Is Bitcoin Wallet for Android Hierarchical Deterministic?
Post by: Andaloons on August 16, 2016, 02:09:52 PM
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.


Title: Re: Is Bitcoin Wallet for Android Hierarchical Deterministic?
Post by: tspacepilot on August 17, 2016, 04:53:49 PM
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.


Title: Re: Is Bitcoin Wallet for Android Hierarchical Deterministic?
Post by: Andaloons on August 17, 2016, 09:28:44 PM
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.



Title: Re: Is Bitcoin Wallet for Android Hierarchical Deterministic?
Post by: tspacepilot on August 18, 2016, 05:23:36 PM
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.


Title: Re: Is Bitcoin Wallet for Android Hierarchical Deterministic?
Post by: Ambaliya on September 02, 2016, 11:11:27 AM
Yes it is since v4.0.

I think Andreas will expose the seed words at some point. Not sure what the delay is.