KGpg/Manual

From KDE UserBase Wiki
Revision as of 13:22, 12 August 2010 by Neverendingo (talk | contribs) (Initial version of KGpg manual)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

KGpg is a simple interface for GnuPG, a powerful encryption utility. GnuPG (also known as gpg) is included in most distributions and should be installed on your system. You can get the latest version on http://gnupg.org.

With KGpg you will be able to encrypt and decrypt your files and emails, allowing much more secure communications. A mini howto on encryption with gpg is available on [web site].

With KGpg, you don't need to remember gpg's command lines and options. Almost everything can be done with a few mouse clicks.

Getting Started

Here is a list of KGpg's main components:

System Tray

When you start KGpg, a system tray icon will appear. A left mouse button click will open the Key Manager window, while a right mouse button click will open a menu allowing quick access to some important features. If you prefer other options you can change the left mouse button action to show the editor or completely disable the system tray icon using the settings dialog.

Please note that the system tray icon of KGpg is marked as "inactive" basically all the time. Since the system tray applet will usually hide inactive icons the one of KGpg will not be shown until you explicitly request it. For details please have a look at the Plasma documentation.

Key Manager Window

That's the central place to manage your keys. To open the Key Manager window, click with the left mouse button on KGpg's applet. You can import, export, sign and edit your keys. Most actions can be performed with a right mouse button click on a key.

Editor Window

It's a simple text editor, where you can type or paste text to encrypt/decrypt it. To open the editor, click with the right mouse button on KGpg's applet.

Fetter Text

It's a simple text editor, where you can type or paste text to encrypt/decrypt it. To open the editor, click with the right mouse button on KGpg's applet.

Using KGpg

There are two ways to encrypt your data:

  • Symmetrical encryption: your data is just encrypted with a password. Anybody who has a computer with gpg can decrypt your message if you give him/her the password. To perform a symmetrical encryption, choose "symmetrical encryption" in the options box when asked to choose an encryption key.
  • Key encryption: you must first create your key pair (secret key and public key) and give a passphrase. Keep your secret key in a safe place, and exchange your public key with your friends. Then, if you want to send an encrypted message to Alex, you must encrypt the message with Alex's public key. To decrypt the message, the recipient will need Alex's secret key and passphrase.

Key encryption is a bit more complicated (you must exchange keys with your friends) but safer. Remember that if you encrypt a key with someone else's key, you will not be able to decrypt it. You can only decrypt messages that have been encrypted with your public key.

Generating a key

If you don't have a key, KGpg will automatically pop up the key generation dialog at the first startup. You can also access it in the Key Manager from Keys->Generate Key Pair.

Simply enter your name, Email address and click Ok. This will generate a standard gpg key. If you want more options, you can click on the Expert Mode button, which will bring up a Konsole window with all of gpg's options.

Many people play around with their first key, generate bad user ids, add comments they later regret or simply forget their passphrase. To avoid such keys to stay valid forever it's usually a good idea to limit the lifetime to some 12 month. You can modify the lifetime of your secret keys later using the key properties window.

Encrypting Your Data

Encrypting a file from Konqueror or Dolphin

Click on the file you want to encrypt with the right mouse button. Choose Actions->Encrypt File in the pop up menu. You will then be prompted with the Public key selection dialog. Choose the key of the recipient and click Encrypt. The encrypted file will be saved with a .asc or .gpg extension depending on whether you chose ASCII armored encryption or not. ASCII encrypted files only use readable characters to represent the data resulting in files that are more robust when copied around or sent by mail but are one third larger.

Encrypting a text with KGpg's applet

You can encrypt the contents of the clipboard by selecting the Encrypt clipboard item in applet menu. When you choose Sign clipboard then the text will be signed instead. Both actions will import the current clipboard contents into an editor window, perform the requested action and paste the contents back into the editor.

Encrypting text from KGpg's editor

This is as simple as clicking on the Encrypt button. You will then be prompted with the Public key selection dialog. Choose your key and click Ok. The encrypted message will appear in the editor window.

Usually you can only encrypt files with keys that are trusted by you. Since you sometimes want to just send a confident note to some random people you are aware of having a GPG key you can set the option Allow encryption with untrusted keys.

To make sure that you can decrypt every file you have encrypted even if they are encrypted with someone else's key you can use the options Always encrypt with and Encrypt files with which are available in the [configuration].

For more information on the encryption options ASCII armor, Allow encryption with untrusted keys and Symmetrical encryption, please refer to gpg's documentation or man pages.