Bitcoin Forum
May 17, 2024, 03:17:05 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: generating an HD wallet.dat file throught a seed?  (Read 1319 times)
BillyBobZorton (OP)
Legendary
*
Offline Offline

Activity: 1204
Merit: 1028


View Profile
January 09, 2017, 04:03:17 PM
 #1

With the release of 0.13.0 HD wallet support was released for Bitcoin Core, so now if you create a new wallet within 0.13.0 and beyond the wallet is HD.

My question is, what are you gaining with that if you can't generate a seed and recover it anywhere? I thought the point of an HD wallet was that you don't need to make backups of the wallet file all time, since you can memorize a seed and spawn your wallet anywhere in the world (like electrum).

So what are the features of the HD wallet in Core? and will be ever able to generate our wallets on the fly through a seed like electrum?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3402
Merit: 6641


Just writing some code


View Profile WWW
January 09, 2017, 04:06:12 PM
 #2

The benefit of the HD wallet is that you don't have to remember to make a backup every 100 transactions. You can make one backup and have access to all of the private keys that you will use with that wallet. The master private key only changes when you encrypt the wallet so when you encrypt it you should back it up. Ideally you will start using your wallet after you encrypt it so really only one backup is needed.

Of course you still should backup periodically so that you don't have to extend the look-ahead keypool when you restore a backup and retain all comments and transaction data.

BillyBobZorton (OP)
Legendary
*
Offline Offline

Activity: 1204
Merit: 1028


View Profile
January 09, 2017, 05:19:08 PM
 #3

The benefit of the HD wallet is that you don't have to remember to make a backup every 100 transactions. You can make one backup and have access to all of the private keys that you will use with that wallet. The master private key only changes when you encrypt the wallet so when you encrypt it you should back it up. Ideally you will start using your wallet after you encrypt it so really only one backup is needed.

Of course you still should backup periodically so that you don't have to extend the look-ahead keypool when you restore a backup and retain all comments and transaction data.

Ah I see, I remember reading something about how annoying it was having to constantly make new backups all the time with the old format.. in a way it forced you to always remember to backup tho lol.

But the question remains: Can we reach a point in bitcoin Core where the software allows to have something like Electrum has? I just find it cool that you could be robbed from all of your physical belongings and your entire house burned down, then held hostage and left in the middle of nowhere, but you still have the seed in your brain that generates access to millions in wealth (in my case just a couple thousand Sad) but still it sounds really cool.

With Bitcoin Core you always depend on the wallet.dat file.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3402
Merit: 6641


Just writing some code


View Profile WWW
January 09, 2017, 05:36:01 PM
 #4

Ah I see, I remember reading something about how annoying it was having to constantly make new backups all the time with the old format.. in a way it forced you to always remember to backup tho lol.

But the question remains: Can we reach a point in bitcoin Core where the software allows to have something like Electrum has? I just find it cool that you could be robbed from all of your physical belongings and your entire house burned down, then held hostage and left in the middle of nowhere, but you still have the seed in your brain that generates access to millions in wealth (in my case just a couple thousand Sad) but still it sounds really cool.

With Bitcoin Core you always depend on the wallet.dat file.
As of right now, BIP 39 seeds are not supported. However, because Bitcoin Core uses BIP 32, you can extract the BIP 32 Master Private Key and use that in any software supporting BIP 32, such as Electrum. You can also get other tools that convert that Master Private Key into a BIP 39 mnemonic and vice versa so you can use that too.

BillyBobZorton (OP)
Legendary
*
Offline Offline

Activity: 1204
Merit: 1028


View Profile
January 09, 2017, 06:26:23 PM
 #5

Ah I see, I remember reading something about how annoying it was having to constantly make new backups all the time with the old format.. in a way it forced you to always remember to backup tho lol.

But the question remains: Can we reach a point in bitcoin Core where the software allows to have something like Electrum has? I just find it cool that you could be robbed from all of your physical belongings and your entire house burned down, then held hostage and left in the middle of nowhere, but you still have the seed in your brain that generates access to millions in wealth (in my case just a couple thousand Sad) but still it sounds really cool.

With Bitcoin Core you always depend on the wallet.dat file.
As of right now, BIP 39 seeds are not supported. However, because Bitcoin Core uses BIP 32, you can extract the BIP 32 Master Private Key and use that in any software supporting BIP 32, such as Electrum. You can also get other tools that convert that Master Private Key into a BIP 39 mnemonic and vice versa so you can use that too.

But in the future we will have BIP39 natively or this poses some sort of downgrade in security? Otherwise I dont know why it hasn't been added already.

You can also get other tools that convert that Master Private Key into a BIP 39 mnemonic and vice versa so you can use that too.

Is there any tutorial in how to do this step by step exactly the right way so I don't screw up in the process? Im very paranoid when dealing with my bitcoins  Lips sealed
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3402
Merit: 6641


Just writing some code


View Profile WWW
January 09, 2017, 07:08:57 PM
 #6

But in the future we will have BIP39 natively or this poses some sort of downgrade in security? Otherwise I dont know why it hasn't been added already.
Perhaps. BIP 39 is not particularly well favored by some of the Core devs as it both does not include necessary meta data (e.g. how many addresses have been used) and it does not have any error checking whatsoever.

A lot of features related to HD wallets are in the works, but are slow to come. This primarily stems from having to create multiple pull requests for all parts of full HD wallet support (e.g. actually easily exporting the mpk is not supported yet, nor is importing one). It takes a lot of work to properly review those changes, especially since there are not many people familiar enough with the wallet code to fully review all of the changes.

Is there any tutorial in how to do this step by step exactly the right way so I don't screw up in the process? Im very paranoid when dealing with my bitcoins  Lips sealed
Not that I know of. However you can easily search for and find open source, downloadable software to convert the xpriv to a mnemonic. To check that it is correct, you can then convert the mnemonic back to the xpriv and check that it matches the original.

Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
January 10, 2017, 01:08:09 AM
 #7

You can also get other tools that convert that Master Private Key into a BIP 39 mnemonic and vice versa so you can use that too.

That isn't possible since the way bip39 works the seed is passed through hashing functions and out comes the master private key. By definition the output of a hashing function cannot be reversed to get the input of the function. So it's a one way process.

However it should be possible to take the extended private key and encode it as a mnemonic using some other algorithm i.e. not bip39.
BillyBobZorton (OP)
Legendary
*
Offline Offline

Activity: 1204
Merit: 1028


View Profile
January 10, 2017, 04:13:24 PM
 #8

Ok from what im reading i think its a better idea for me to stick with the regular wallet.dat for the time being and maybe in the future use the native BIP 29 if it ever comes... if it doesn't it's not the end of the world I guess. I'll put several backups in several places with good encryption and I should be able to recover my wallet anytime.
LoyceV
Legendary
*
Offline Offline

Activity: 3318
Merit: 16663


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
January 10, 2017, 04:24:03 PM
Last edit: January 13, 2017, 06:42:20 AM by LoyceV
 #9

Ah I see, I remember reading something about how annoying it was having to constantly make new backups all the time with the old format.. in a way it forced you to always remember to backup tho lol.
In the old format, you could increase the keypool. I did this, it's set to 10,000 now. That made my wallet.dat about 6 MB large, and it holds more keys than I expect to use in many years to come.
If you're still using an older wallet.dat, I recommend doing so too. Although I would like to use a new HD-wallet, I don't want to lose my current addresses, so I'm still using the older format.

Note: backup the file wallet.dat right after increasing the keypool!

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3402
Merit: 6641


Just writing some code


View Profile WWW
January 10, 2017, 04:26:04 PM
 #10

You can also get other tools that convert that Master Private Key into a BIP 39 mnemonic and vice versa so you can use that too.

That isn't possible since the way bip39 works the seed is passed through hashing functions and out comes the master private key. By definition the output of a hashing function cannot be reversed to get the input of the function. So it's a one way process.

However it should be possible to take the extended private key and encode it as a mnemonic using some other algorithm i.e. not bip39.
Hmm. Right, you can't do that since the mnemonic only goes one way to the seed. I must have been thinking of a different algorithm, but I can't remember what that was.

Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
January 13, 2017, 12:25:10 AM
 #11

You can also get other tools that convert that Master Private Key into a BIP 39 mnemonic and vice versa so you can use that too.

That isn't possible since the way bip39 works the seed is passed through hashing functions and out comes the master private key. By definition the output of a hashing function cannot be reversed to get the input of the function. So it's a one way process.

However it should be possible to take the extended private key and encode it as a mnemonic using some other algorithm i.e. not bip39.
Hmm. Right, you can't do that since the mnemonic only goes one way to the seed. I must have been thinking of a different algorithm, but I can't remember what that was.

You could convert a number to a mnemonic with the old electrum algorithm. Pre 2.0. See under mnemonic here:

https://bitcoinspakistan.com/blog/electrum-seed-explained/

However an extended private key is more than just one number. There is a chain code, a key, depth and version number. So lots of stuff in there. Somebody would have to unravel all that.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!