How to Password Protect the wallet.dat

I am assuming that zcashd has a built-in way to password protect the wallet.dat file (and that I don’t have to use third party software to do that).

If that’s the case, can anyone tell me how to:

(1) Increase my keypool size so that my keypool contains 10,000 addresses.

(2) Add a password to my wallet so if my neighbor gets into my server room he can’t make off with my coins.

(3) Import that wallet to a second zcashd instance (on a different computer). Is this as simple as copying the wallet.dat file into the ~/.zcash/testnet3/ directory?

I appreciate your help!

1 Like

I found the answer to number (2): You can increase the keypool size via the command:

~/zcash/./src/zcash-cli keypoolrefill 10000

1 Like

Bitcoin Core does support wallet encryption, and the code for that is inherited by Zcash. However, it’s difficult to use without the UI in bitcoin-qt (see Step 2 at http://altoidnerd.com/2015/09/11/getting-started-with-bitcoin-the-right-way-bitcoin-core-and-linux/ ), and you might find the qt wallet difficult to compile for Zcash right now. If you manage it then please let us know.

1 Like

so we need an UI :slight_smile: !

1 Like

Thank you Daira, I appreciate it.

1 Like

The current wallet encryption does not support encrypting Zcash-specific keys. We’re working on that now: https://github.com/zcash/zcash/pull/1210

2 Likes

Encryption of Zcash-specific keys is likely to be supported in Beta 1.

1 Like

@daira based on PR 1372 it looked like str4d added support for wallet encryption, but “zcash-cli encryptwallet” prints out an error saying that it always fails. Was this just user error, or is wallet encryption not supported yet?

Disable wallet encryption - Disable wallet encryption. · Issue #1552 · zcash/zcash · GitHub

2 Likes

@vaklinov thanks for the reference :slight_smile: