Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: sandaq on July 26, 2016, 03:50:18 PM



Title: bitcoin core on linux
Post by: sandaq on July 26, 2016, 03:50:18 PM
I installed bitcoin core on linux and encrypted the wallet, it asked me for a passphrase and I gave it one. Now there's no indication anything is encrypted. I don't see any key in the bitcion directory and when I open the wallet it doesn't ask me for the passphrase.

Is the wallet really encrypted? when will I have to use the passphrase? Where are the keys?


Title: Re: bitcoin core on linux
Post by: achow101 on July 26, 2016, 04:29:25 PM
I installed bitcoin core on linux and encrypted the wallet, it asked me for a passphrase and I gave it one. Now there's no indication anything is encrypted. I don't see any key in the bitcion directory and when I open the wallet it doesn't ask me for the passphrase.

Is the wallet really encrypted? when will I have to use the passphrase? Where are the keys?
Yes the wallet is encrypted. You will only have to use the passphrase when you need to access the private keys. This only happens when you want to send Bitcoin or sign a message.

Only the private keys are encrypted, not the addresses nor the public keys.


Title: Re: bitcoin core on linux
Post by: sandaq on July 26, 2016, 04:33:36 PM
I installed bitcoin core on linux and encrypted the wallet, it asked me for a passphrase and I gave it one. Now there's no indication anything is encrypted. I don't see any key in the bitcion directory and when I open the wallet it doesn't ask me for the passphrase.

Is the wallet really encrypted? when will I have to use the passphrase? Where are the keys?
Yes the wallet is encrypted. You will only have to use the passphrase when you need to access the private keys. This only happens when you want to send Bitcoin or sign a message.

Only the private keys are encrypted, not the addresses nor the public keys.

Thanks for the answer.

Where are the keys located? I want to backup them and can't find them.


Title: Re: bitcoin core on linux
Post by: achow101 on July 26, 2016, 05:52:12 PM
I installed bitcoin core on linux and encrypted the wallet, it asked me for a passphrase and I gave it one. Now there's no indication anything is encrypted. I don't see any key in the bitcion directory and when I open the wallet it doesn't ask me for the passphrase.

Is the wallet really encrypted? when will I have to use the passphrase? Where are the keys?
Yes the wallet is encrypted. You will only have to use the passphrase when you need to access the private keys. This only happens when you want to send Bitcoin or sign a message.

Only the private keys are encrypted, not the addresses nor the public keys.

Thanks for the answer.

Where are the keys located? I want to backup them and can't find them.
They are contained in the wallet.dat file. Backup the entire file. You can also, in Bitcoin Core, go to File > Backup Wallet and save the file in a safe location.


Title: Re: bitcoin core on linux
Post by: LoyceV on July 28, 2016, 08:30:07 PM
Where are the keys located?
On my system this file shows where it is:
/home/loyce/.config/Bitcoin/Bitcoin-Qt.conf
Code:
strDataDir=/blockchains/bitcoin
I'm not sure what the default location is, as I've changed it by myself. Most likely your wallet.dat file is located in [homedir]/.bitcoin or something that looks like it.

Note that making a backup once is NOT enough! By default it contains 100 private keys, once you've used them all it creates new keys, which means you need to make a new backup!


Title: Re: bitcoin core on linux
Post by: sandaq on July 28, 2016, 08:46:29 PM
Thank for the answer.


Note that making a backup once is NOT enough! By default it contains 100 private keys, once you've used them all it creates new keys, which means you need to make a new backup!

It seems my understanding was faulty. I though it's like for ssh, you have one key and it's used all the time. But now I see that I was wrong.

When do the private keys are being used? is it a key for every transaction?


Title: Re: bitcoin core on linux
Post by: achow101 on July 28, 2016, 08:51:05 PM
Thank for the answer.


Note that making a backup once is NOT enough! By default it contains 100 private keys, once you've used them all it creates new keys, which means you need to make a new backup!

It seems my understanding was faulty. I though it's like for ssh, you have one key and it's used all the time. But now I see that I was wrong.

When do the private keys are being used? is it a key for every transaction?
The keys are used for every new address that is made. This is when you get a new receiving address for every time you want someone sends you Bitcoin (you should not reuse addresses). A new address will usually be used when you send as well since there is usually a change address. So you will need to backup every 100 transactions, both receive and send.


Title: Re: bitcoin core on linux
Post by: cr1776 on July 28, 2016, 09:03:04 PM
Thank for the answer.


Note that making a backup once is NOT enough! By default it contains 100 private keys, once you've used them all it creates new keys, which means you need to make a new backup!

It seems my understanding was faulty. I though it's like for ssh, you have one key and it's used all the time. But now I see that I was wrong.

When do the private keys are being used? is it a key for every transaction?

A nice change for 0.13.0 will be that by default this behavior will change with HD support


Title: Re: bitcoin core on linux
Post by: Shiroslullaby on July 29, 2016, 12:54:36 AM
HD support = Deterministic wallet?
(I've never heard it called this before but I think youre talking about-
"system of deriving keys from a single starting point known as a seed. The seed allows a user to easily back up and restore a wallet without needing any other information and can in some cases allow the creation of public addresses without the knowledge of the private key. "

(From the wiki- https://en.bitcoin.it/wiki/Deterministic_wallet)


Title: Re: bitcoin core on linux
Post by: achow101 on July 29, 2016, 01:12:58 AM
HD support = Deterministic wallet?
(I've never heard it called this before but I think youre talking about-
"system of deriving keys from a single starting point known as a seed. The seed allows a user to easily back up and restore a wallet without needing any other information and can in some cases allow the creation of public addresses without the knowledge of the private key. "

(From the wiki- https://en.bitcoin.it/wiki/Deterministic_wallet)
HD means Heirarchical Deterministic, so a Deterministic Wallet. The commonly used specification for an HD wallet is BIP32.


Title: Re: bitcoin core on linux
Post by: Shiroslullaby on July 29, 2016, 07:54:43 PM
Thanks man. I honestly got scared  when it said that my Etherium wallet used a word combination seed.
What is the strength of the seed rated ad? Is it possible to hack the word key?


Title: Re: bitcoin core on linux
Post by: shorena on July 29, 2016, 08:24:19 PM
Thanks man. I honestly got scared  when it said that my Etherium wallet used a word combination seed.
What is the strength of the seed rated ad? Is it possible to hack the word key?

The seed is 128 bit, so its perfectly fine. Not sure what you mean with hack here, but a brute force attack is not possible no.


Title: Re: bitcoin core on linux
Post by: DarkStar_ on July 29, 2016, 10:54:56 PM
Thanks man. I honestly got scared  when it said that my Etherium wallet used a word combination seed.
What is the strength of the seed rated ad? Is it possible to hack the word key?

The seed is 128 bit, so its perfectly fine. Not sure what you mean with hack here, but a brute force attack is not possible no.
A bruteforce attack is possible on the seed. You would have to write a script that downloads a list of words from a dictionary, and tries every combination. It would also check to see if it leads to a wallet with funds. Would be very very hard, and very unlikely that there would be a match. I believe there is 12 (16?) words needed in the seed, and over 10k words that could be used for the seed.


Title: Re: bitcoin core on linux
Post by: shorena on July 30, 2016, 07:09:00 AM
Thanks man. I honestly got scared  when it said that my Etherium wallet used a word combination seed.
What is the strength of the seed rated ad? Is it possible to hack the word key?

The seed is 128 bit, so its perfectly fine. Not sure what you mean with hack here, but a brute force attack is not possible no.
A bruteforce attack is possible on the seed. You would have to write a script that downloads a list of words from a dictionary, and tries every combination. It would also check to see if it leads to a wallet with funds. Would be very very hard, and very unlikely that there would be a match. I believe there is 12 (16?) words needed in the seed, and over 10k words that could be used for the seed.

Let me rephrase that: Yes a brute force attack is possible, but not feasible.

Using any dictionary wouldnt make any sense, the dictionary used by electrum is known[1]. With 2048 possible words and 12 selected from that list there are 204812 possible seeds, which is actually more than 128 bit (log_2(2048^12) = 132)

[1] https://github.com/spesmilo/electrum/blob/master/lib/wordlist/english.txt