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 emails” to learn how to make use of those options in KMail.

KGpg also offers the possibility to encrypt text. To open the integrated editor choose File+Open Editor.

Encrypting and Decrypting from a File Manager

KGpg is also integrated into file managers like Dolphin or Konqueror. Generally, PGP-encrypted files are designated with the suffix asc. There are several options how to encrypt or decrypt files inside a File Manager:

Encrypt a File

To encrypt a file inside a File Manager, right-click the file and select Actions+Encrypt File. Choose one of the trusted keys in the dialog. After clicking OK in the dialog, a new file with the asc suffix will be created in the same directory.

Decrypt a File on the fly

To decrypt an encrypted file instantly, right-click the file and select Open with KGpg. If the original filename already exists, a dialog opens that asks how to name the file or if it should be overwritten. KGpg prompts for the password of your private key and saves the decrypted file in the same directory.

Decrypt with the editor

To decrypt an encrypted file with the editor, right-click the file in the File Manager and select Actions+View file decrypted.

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, select File+Open Editor. In the editor, enter the desired text (or copy it into the editor from the clipboard or any file), 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. Select the private key to use and enter the associated password. KGpg informs you of 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.