How Can We Help?
What is BIP38 and how to use it in the GUAP Desktop Wallet?
BIP38 is a way to protect a private key using encryption. You are probably already familiar with encrypting your wallet.dat file. This is the same concept, but this encryption applies to the private key of a specific address instead of the entire wallet file, which holds many private keys. The end result is a string of characters that requires your chosen passphrase to decrypt. Some use cases for BIP38 are:
- A more secure form of paper wallet
- Extra security when handling private keys because otherwise dumpprivkey outputs the plaintext key.
GUI
Encrypting the Key
- On your wallet that currently holds the address and private key, you will need to open up your GUAP Core wallet.
- Go to Settings > BIP38 Tool.
- A dialog box will appear that prompts you for the address and passphrase you want to encrypt it with. Complete these prompts and click “Encrypt Key…” at the bottom left. Note that the passphrase can’t include symbols or spaces (unlike the passphrase you have chosen for to encrypt the entire wallet, which can include symbols and spaces).
- If you have not fully unlocked your wallet, you will be prompted to do so. “For staking only” is not sufficient for this operation.
- After some time, the encryption will complete and display the BIP38 encrypted form of your address’s private key.
- Remember to relock your wallet and then if needed for staking unlock it “For staking only”.
Decrypting the Key (optional)
- On your wallet that currently holds the address and private key, you will need to open up your GUAP Core wallet.
- Go to Settings > BIP38 Tool.
- Navigate to the Decrypt tab.
- A dialog box will appear that prompts you for the address and passphrase you want to decrypt it with. Complete these prompts and click Decrypt at the bottom left.
- If you have not fully unlocked your wallet, you will be prompted to do so. “For staking only” is not sufficient for this operation.
- After some time, the decryption will complete.
- Remember to relock your wallet and then if needed for staking unlock it “For staking only”.
Command Line
Encrypting the Key
- For this operation we will need to fully unlock the wallet with the command below. If you don’t do this step you will get the message: error: {“code”:-13,”message”:”Error: Please enter the wallet passphrase with walletpassphrase first.”}
guapcoin-cli walletpassphrase YOURSECURESECRETPASSWORD 0 false
- Now, we will use the command bip38encrypt. You will need to provide the address and passphrase for encryption. You can get your addresses with the listaddressgroupings command
guapcoin-cli bip38encrypt addressToBeEncrypted passphraseToEncryptItWith
- Your BIP38 encrypted form of the address’s private key will be displayed.
- Remember to relock your wallet and then if needed for staking unlock it “For staking only”.
Decrypting the Key (optional)
- For this operation we will need to fully unlock the wallet with the command below. If you don’t do this step you will get the message: error: {“code”:-13,”message”:”Error: Please enter the wallet passphrase with walletpassphrase first.”}
guapcoin-cli walletpassphrase YOURSECURESECRETPASSWORD 0 false
- Now, we will use the command bip38encrypt. You will need to provide the address and passphrase for encryption. You can get your addresses with the listaddressgroupings command
guapcoin-cli bip38decrypt addressToBeDecrypted passphraseToDecryptItWith
- After some time the decryption will be complete and your address and the private key will be displayed.
- Remember to relock your wallet and then if needed for staking unlock it “For staking only”.