Setting up KDE Wallet with GPG encryption

The first time an application tries to access your KDE Wallet, if it doesn’t exist, the following windows will pop up.

If you click next and don’t find your GPG key that can be because it’s level of trust is insuficient. To fix this follow these steps.

1. Find the uid of the key you want to edit:

Type gpg --list-keys to see your available keys and get it’s uid

➜  ~ gpg --list-keys                        
/home/alejandro/.gnupg/pubring.kbx
----------------------------------
pub   rsa4096 2021-06-16 [SC] [expires: 2024-06-15]
      3E6C08BFBF1EAC1E8CDCCC2555DFFFC61C31
uid           [ultimate] Alejandro Criado-Pérez <alejandro@criadoperez.co>
sub   rsa4096 2021-06-16 [E] [expires: 2024-06-15]

In this example the uid is Alejandro Criado-Pérez

2. Edit the trust level of the key with the command gpgp --edit-key uid

➜  ~ gpg --edit-key 'Alejandro Criado-Pérez'
gpg (GnuPG) 2.2.27; Copyright (C) 2021 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Secret key is available.

sec  rsa4096/866DF33C62D40AAA
     created: 2021-06-16  expires: 2024-06-15  usage: SC
     trust: unknown       validity: unknown
ssb  rsa4096/5AB63D7711193B2D
     created: 2021-06-16  expires: 2024-06-15  usage: E
[ unknown] (1). Alejandro Criado-Pérez <alejandro@criadoperez.co>

gpg>

3. Type trust:

gpg> trust
sec  rsa4096/866DF33C62D40AAA
     created: 2021-06-16  expires: 2024-06-15  usage: SC
     trust: unknown       validity: unknown
ssb  rsa4096/5AB63D7711193B2D
     created: 2021-06-16  expires: 2024-06-15  usage: E
[ unknown] (1). Alejandro Criado-Pérez <alejandro@criadoperez.co>

Please decide how far you trust this user to correctly verify other users keys
(by looking at passports, checking fingerprints from different sources, etc.)

  1 = I don't know or won't say
  2 = I do NOT trust
  3 = I trust marginally
  4 = I trust fully
  5 = I trust ultimately
  m = back to the main menu

Your decision?

4. Answer 5:

Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) y

sec  rsa4096/866DF33C62D40AAA
     created: 2021-06-16  expires: 2024-06-15  usage: SC
     trust: ultimate      validity: unknown
ssb  rsa4096/5AB63D7711193B2D
     created: 2021-06-16  expires: 2024-06-15  usage: E
[ unknown] (1). Alejandro Criado-Pérez <alejandro@criadoperez.co>
Please note that the shown key validity is not necessarily correct
unless you restart the program.

gpg>

5. Type quit to exit gpg

gpg> quit

At this point, when you click on Next on this screen:

You should see the key with the high trust level. Select it, and click Finish.

6. Solving error code 55

It may happen to you that you get the following Error code 55 (Invalid value) the first time you try to use the wallet.

If so, open your KDE Wallet and click on `Launch Wallet Manager’

Click on Change Password:

You will be prompt to enter the current password of your key (you won’t be changing it), and that’s it!

7. Enjoy KDE Wallet’s GPG security!