Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: bwv1056 on October 01, 2019, 02:32:06 AM



Title: About bitcoincore encryptwallet command
Post by: bwv1056 on October 01, 2019, 02:32:06 AM
About bitcoincore encryptwallet command.

BitcoinCore encryptwallet command is to prevent someone to access and steal private keys.

So I will encrypt my "wallet.dat" by using encryptwallet command.

------------------------------------------------------------------------
$ encryptwallet passphrase  interval
------------------------------------------------------------------------

But I doubt that how secure encryptwallet command is.

So I have two questions.

Q1.
Is it easy to decrypt encrypted wallet.dat by using random list attacking method or analyzing wallet.dat ?

In the past, have there been any cases where your passphrase has been decrypted ?

Q2,
-----------------------------------------------------------------------
Arguments:
1. "passphrase"    (string) The pass phrase to encrypt the wallet with.
It must be at least 1 character, but should be long.
-------------------------------------------------------------------------

What is the maximum passphrase length ?

I want to set my passphrase as long as possible.


Title: Re: About bitcoincore encryptwallet command
Post by: nc50lc on October 01, 2019, 04:16:16 AM
Q1.
Is it easy to decrypt encrypted wallet.dat by [1] using random list attacking method or [2] analyzing wallet.dat ?
[3]In the past, have there been any cases where your passphrase has been decrypted ?
1. Depends on the strength of your passphrase: number of characters and randomness.
2. It's nearly impossible to decrypt using this method.
3. Well, there are some available passphrase bruteforcing tool like btcrecover; so if the leaked wallet.dat's passphrase is weak, it could be bruteforced easily.
What d you mean by "your", 2nd-person specific?
Me, never, I'm using a passphrase with long, mixed-case, numerical and punctuation mark characters.

Quote from: bwv1056
Q2,
What is the maximum passphrase length ?
I have no idea,
But you should check this article about passphrase: Passphrase Generation (https://en.bitcoin.it/wiki/Passphrase_generation)
It got all the information you need.


Title: Re: About bitcoincore encryptwallet command
Post by: joniboini on October 01, 2019, 04:53:39 AM
1. "passphrase"    (string) The pass phrase to encrypt the wallet with.
It must be at least 1 character, but should be long.
-------------------------------------------------------------------------
What is the maximum passphrase length ?

It's 256 bits or 1.1 x 1077 chars according to this discussion.[1] You can use more but in the end, it would be useless because the encryption use 256 bits key. CMIIW.

[1] https://bitcoin.stackexchange.com/questions/41171/what-is-the-largest-password-passphrase-size-for-a-wallet-dat-file


Title: Re: About bitcoincore encryptwallet command
Post by: bwv1056 on October 01, 2019, 04:54:41 AM
Thank you for quick and useful answer.

:)
What d you mean by "your", 2nd-person specific?
Me, never, I'm using a passphrase with long, mixed-case, numerical and punctuation mark characters.
Sory I was confused.
I meant to express a person who encrypted his own wallet.dat with his password.

Thank for good advice !
I will take your advice and  use a passphrase  with long, mixed-case, numerical and punctuation mark characters.

I have no idea,
But you should check this article about passphrase: Passphrase Generation (https://en.bitcoin.it/wiki/Passphrase_generation)
It got all the information you need.
Thank for good information.


Title: Re: About bitcoincore encryptwallet command
Post by: bwv1056 on October 01, 2019, 05:05:29 AM
1. "passphrase"    (string) The pass phrase to encrypt the wallet with.
It must be at least 1 character, but should be long.
-------------------------------------------------------------------------
What is the maximum passphrase length ?

It's 256 bits or 1.1 x 1077 chars according to this discussion.[1] CMIIW.

[1] https://bitcoin.stackexchange.com/questions/41171/what-is-the-largest-password-passphrase-size-for-a-wallet-dat-file

Thank you for the good information.
>It's 256 bits or 1.1 x 1077 chars according to this discussion.[1] CMIIW.
I was relieved.


Title: Re: About bitcoincore encryptwallet command
Post by: Dabs on October 01, 2019, 04:37:26 PM
The way Core encrypts is dependent on how fast your computer is, and whenever you do an update of the passphrase, it re-encrypts the master key. As far as I can tell, there is no maximum length, but I would stick to using characters you can actually type on a keyboard and not go longer than 60 or 70 characters. There is no point particularly if your password is already randomly generated.


Title: Re: About bitcoincore encryptwallet command
Post by: bwv1056 on October 02, 2019, 05:40:54 AM
The way Core encrypts is dependent on how fast your computer is, and whenever you do an update of the passphrase, it re-encrypts the master key. As far as I can tell, there is no maximum length, but I would stick to using characters you can actually type on a keyboard and not go longer than 60 or 70 characters. There is no point particularly if your password is already randomly generated.
Thank you for good advice.
I decide to set my passphrase between 60 and 70 characters.
Once I set my wallet passphrase, I do not have a plan to chagnge passphrase for a few years unless I have any trouble.


Title: Re: About bitcoincore encryptwallet command
Post by: joniboini on October 02, 2019, 01:42:13 PM
I decide to set my passphrase between 60 and 70 characters.

Make sure to have a proper backup. You might not feel it right now, but lots of people lose their life savings because they forgot the password they usually used 1-2 years ago. In short: expect that you will not remember it instead of believing you won't forget your password.


Title: Re: About bitcoincore encryptwallet command
Post by: nc50lc on October 02, 2019, 01:59:13 PM
Make sure to have a proper backup. You might not feel it right now, but lots of people lose their life savings because they forgot the password they usually used 1-2 years ago. In short: expect that you will not remember it instead of believing you won't forget your password.
He can't do that, the non-encrypted wallet.dat won't restore the new private keys/addresses generated by the encrypted wallet because the wallet's master private key have changed (read (https://bitcointalk.org/index.php?topic=1724443.msg17258841#msg17258841)).
Only old addresses before the encryption will be available; if he generate new addresses, they will be different.

Or do you mean written/file backup of the passphrase?


Title: Re: About bitcoincore encryptwallet command
Post by: joniboini on October 03, 2019, 04:14:08 AM
Or do you mean written/file backup of the passphrase?

Yes.


Title: Re: About bitcoincore encryptwallet command
Post by: bwv1056 on October 03, 2019, 05:33:05 AM
I decide to set my passphrase between 60 and 70 characters.

Make sure to have a proper backup. You might not feel it right now, but lots of people lose their life savings because they forgot the password they usually used 1-2 years ago. In short: expect that you will not remember it instead of believing you won't forget your password.
Thank you for good advide.
I will backup my wallet.dat and my passphrase right after I encrypt my wallet.dat.