Author

Topic: generating an HD wallet.dat file throught a seed? (Read 1343 times)

legendary
Activity: 3710
Merit: 1586
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.
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
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!
legendary
Activity: 1204
Merit: 1028
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.
legendary
Activity: 3710
Merit: 1586
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.
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
legendary
Activity: 1204
Merit: 1028
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
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
legendary
Activity: 1204
Merit: 1028
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.
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
legendary
Activity: 1204
Merit: 1028
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?
Jump to: