Encrypting Your Data

After you have generated your key pair, exported your public key and imported public keys from others, you can also send or receive encrypted mails. Refer to Section 5.2.5, “Signing and Encrypting E-Mails” to learn how to make use of those options in KMail.

KGpg also offers the possibility to encrypt text or clipboard contents. Right-click the padlock icon and find the options Encrypt clipboard and Decrypt clipboard as well as the option for opening the integrated editor.

Encrypting and Decrypting the Clipboard

Files copied to the clipboard can easily be encrypted with a few clicks. Right-click the KGpg padlock icon and select Encrypt Clipboard. Select the key to use. A status message about the encryption procedure is displayed on the desktop. The encrypted contents can now be processed from the clipboard as needed. The decryption of clipboard contents is just as easy. Simply open the menu on the panel, select Decrypt Clipboard, and enter the passphrase associated with your private key. The decrypted version is now available for processing in the clipboard and in the KGpg editor. Note that you can only encrypt or decrypt the current clipboard object, not all entries that clipboard tools like Klipper store for you.

Encrypting and Decrypting from a File Manager

KGpg is also integrated into file managers like Dolphin or Konqueror. In the file manager, encrypted files are designated with the suffix .asc. To encrypt or decrypt a file, right-click the file and select the respective menu item from the context menu.

The KGpg Editor

Instead of creating contents for encryption in an external editor then encrypting the file with one of the methods described above, you can use the integrated editor of KGpg. To open the editor, right-click the padlock icon in the panel and select Open Editor. In the editor, enter the desired text (or copy it into the editor from the clipboard), and click Encrypt. Then select the key to use and complete the encryption procedure. To decrypt files, use Decrypt and enter the password associated with the key.

Generating and checking signatures is just as easy as encrypting directly from the editor. Go to Signature+Generate Signature and select the file to sign from the file dialog. Then select the private key to use and enter the associated password. KGpg informs about the successful generation of the signature. Files can also be signed from the editor by simply clicking Sign/Verify. To check a signed file, go to Signature+Verify Signature and select the file to check in the following dialog. After you confirm the selection, KGpg checks the signature and reports the result of the operation. Another possibility is to load the signed file into the editor and click Sign/Verify.