Pages:
Author

Topic: Producing a deterministic wallet - page 2. (Read 928 times)

legendary
Activity: 3584
Merit: 5243
https://merel.mobi => buy facemasks with BTC/LTC
November 29, 2017, 01:59:31 AM
#7
--snip--
Is it actually

importprivkey xxxxxxxxxx mybitcoinsatDec2017 rescan                          where xxxxxxxxxx is the private key and is "label" just a name for reference? What does (rescan) do and do I type it without the brackets?
--snip--

That would be allmost correct, the rescan is either True or False not "rescan", just open the debug window, and enter this command... The label and the rescan are optional... You don't really need to enter those.
Where do you get the private key? Well, that was what the other posters and myself were telling you: you can use python (there is also a way to generate a script to derive keys from an xprv that can be written in python), or you use python to create a single private key (non hd), or you use bitaddress,...
Or you take the easy route and just use electrum for everything, in that case you don't need to worry about creating private keys and importing them...

One more question.
I bought and sold Bitcoins using a previous computer and I encrypted that Bitcoin-qt wallet.
I have just built a new computer, installed Bitcoin-qt 15.1 and downloaded the blockchain. Very pleased as it only took about 8 hours.  Shocked)
What happens now when I swap the default wallet.dat (that shows zeros) with my actual wallet.dat that holds all my Bitcoins.
Is the encryption in my wallet.dat file?
Or do I load my wallet.dat file and then encrypt the new Bitcoin-qt wallet, and if so can I use a different password?




No, if you swap your new (empty) wallet.dat with the old one, the encryption is still there.

As for the last question i found in your post: what does the HD mean: it means your new wallet is deterministic. It is deriving pk's=>public keys=>addrsses from an xprv, so you only need to backup your new wallet once.. .The non-deterministic wallets generate a random key each time you use a new address, so you need to backup this wallet at least every 100 actions you make.
newbie
Activity: 9
Merit: 0
November 28, 2017, 06:59:43 PM
#6
Importing private keys into Bitcoin Core is easy:
Code:
Click Help > Debug window > Console > enter importprivkey "privkey" ( "label" ) ( rescan )

Many thanks everyone for the help.

I think writing the private key is easiest.

How do you use the code

Code:
enter importprivkey "privkey" ( "label" ) ( rescan )
?

What do I write in the console window?
Is it actually

importprivkey xxxxxxxxxx mybitcoinsatDec2017 rescan                          where xxxxxxxxxx is the private key and is "label" just a name for reference? What does (rescan) do and do I type it without the brackets?

Where do you find this information?

So do I just need the private key to reclaim my bitcoins. Are the public keys generated from the private key?

Also, in the bottom right of Bitcoin-qt is a button labelled HD. What does that do?

Thanks for you help. I'm on the verge of understanding this fully



One more question.
I bought and sold Bitcoins using a previous computer and I encrypted that Bitcoin-qt wallet.
I have just built a new computer, installed Bitcoin-qt 15.1 and downloaded the blockchain. Very pleased as it only took about 8 hours.  Shocked)
What happens now when I swap the default wallet.dat (that shows zeros) with my actual wallet.dat that holds all my Bitcoins.
Is the encryption in my wallet.dat file?
Or do I load my wallet.dat file and then encrypt the new Bitcoin-qt wallet, and if so can I use a different password?





legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
November 28, 2017, 06:34:38 AM
#5
2) disconnect your internet, start electrum, create a new wallet, write down the seed words, generate a new deposit address
~
4) delete the wallet again, reboot, reconnect to the internet, fund the address generated in step 2 (and 3, since that's the same address)
I wouldn't rely on just this: malware is very patient, and very persistent. It's always safest to just assume you have malware that can record your data even when you're offline.
I prefer to use an Ubuntu LIVE CD for this, running entirely from memory, without any network connected. Once you turn off the PC, you can be absolutely sure nothing gets stored on your PC.

2) Also, is another method to write down the private key and public keys on paper? If so, how are these obtained and then how are they input back into Bitcoin.qt?
Any private key you create with any program can be written down if your handwriting is accurate enough. It's much easier to use software designed to create paper wallets. There are at least 2 I trust (and many more I don't trust!):
https://www.bitaddress.org
https://bitcoinpaperwallet.com/
Of course, here too, download the website, and run it offline from a Linux LIVE CD. Print it on a dumb laser printer (big office printers with hard drive can store data) with an USB-cable. You can use inkjet too, but it gets destroyed if your paper wallet ever gets wet.

Importing private keys into Bitcoin Core is easy:
Code:
Click Help > Debug window > Console > enter importprivkey "privkey" ( "label" ) ( rescan )
legendary
Activity: 1624
Merit: 2481
November 28, 2017, 04:57:55 AM
#4
There are other ways to achieve the same thing, like using python to convert a random seed to an xprv, then use a fixed derivation path to derive private keys from this xprv, then use the private key to generate a public key, and the public key to generate an address...

Python is pretty suitable for this imo. The bitcoin-python libary is pretty user friendly.
With bitcoin-python its basically just this to create the priv-/pub key pair out of a seed:

Code:
priv = sha256('ultrasecure password phrase')

pub = privtopub(priv)
addr= pubtoaddr(pub)

Now if you want to make a deterministic wallet you can modify your seed each time you generate a new address with a speficic pattern.
This way your (random) seed phrase is of course not importable to electrum or other wallets. You would have to calculate the priv key out of your seed 'manually' each time.
legendary
Activity: 3584
Merit: 5243
https://merel.mobi => buy facemasks with BTC/LTC
November 28, 2017, 02:09:18 AM
#3
the "step by step" version is really, really easy:

1) download the standalone version of electrum
2) disconnect your internet, start electrum, create a new wallet, write down the seed words, generate a new deposit address
3) close electrum, remove the wallet file, try to restore the wallet from seed, check if the first generated deposit address matches the one in step 2)
4) delete the wallet again, reboot, reconnect to the internet, fund the address generated in step 2 (and 3, since that's the same address)
5) make safe copies of your words, don't let the touch a computer, laminate the paper, only store it in a very safe spot, or maybe even use something like https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing (only run such a tool on an offline pc if you want to enter your seed, and always double check if you can restore the seed before burning your original copy!!!)

The thing is: you'll have to move your funds from bitcoin-qt to (in this case) electrum. bitcoin-qt doesn't use a mnemonic at this point (afaik).

There are other ways to achieve the same thing, like using python to convert a random seed to an xprv, then use a fixed derivation path to derive private keys from this xprv, then use the private key to generate a public key, and the public key to generate an address... Or there are downloadable tools like https://github.com/iancoleman/bip39... But i think electrum is the most user friendly way to achieve your goal Smiley
member
Activity: 301
Merit: 74
November 28, 2017, 02:06:25 AM
#2
I think Core doesn't support mnemonic seeds (BIP39). It only supports the hierarchical deterministic (HD) wallets (BIP32).

Not sure about dumping/restoring HD wallet seed.
newbie
Activity: 9
Merit: 0
November 27, 2017, 09:41:30 PM
#1
Hi, I've looked at many locations across the internet and asked 'experts', but I cannot find what I need.


I have wallet.dat stored on several USB and SD flash drives and use Bitcoin.qt v15.1.
I’m just sitting on the bitcoins at present so will not be actively buying or selling.
I believe these storage devices are not ideal as they can age and corrupt the dat file.
I’m thinking that writing the relevant information to paper may be the best system.

1) I’m reading about deterministic wallets where mnemonic words can be used to reclaim bitcoins.
I cannot find a step by step set of instructions of how to do this. I’m finding loads of deep theory information or just plain dreadful explanations.
Have I understood this correctly? Can a set of words be written down on paper and used to reclaim the bitcoins? If so, would you kindly supply a line-by-line account of the procedure?

2) Also, is another method to write down the private key and public keys on paper? If so, how are these obtained and then how are they input back into Bitcoin.qt?

I would appreciate any help on this. I don't understand why the Bitcoin-qt site doesn't show these instructions, or am I just not finding them.
Pages:
Jump to: