# The &kgpg; Handbook

## 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 gnupg's 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 Icon

- &kgpg; system tray applet

  When you start &kgpg;, a system tray icon will appear. A &LMB; click will open the Key Manager window, while a &RMB; click will open a menu allowing quick access to some important features. You can also drop files or text on the applet icon to encrypt or decrypt it.

Key Manager Window

- Key manager window

  That's the central place to manage your keys. To open the Key Manager window, &LMB; on &kgpg;'s applet. You can import, export, sign and edit your keys. Most actions can be performed with a &LMB; click on a key.

Editor Window

- Editor window

  It's a simple text editor, where you can type or paste text to encrypt/decrypt it. To open the editor, &RMB; on &kgpg;'s applet.

Konqueror Integration

- &kgpg; is integrated in &konqueror;. It means that when you right click on a file, you can choose Actions Encrypt File to encrypt a file. You can decrypt a file with a &LMB; click.

## 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 plece, 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.

Key generation dialog

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.

### Encrypting Your Data

#### Encrypting a File From &konqueror;

Click on the file you want to encrypt with the &RMB;. 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 encryption or not.

#### Encrypting a File or Text With &kgpg;'s Applet

Simply drop your file on the &kgpg; system tray applet. If it is an unencrypted file, &kgpg; will pop up the key selection dialog (see below). Select the encryption key, and the encrypted file will be saved. If you drop text, the encrypted text will be pasted to the clipboard. You can also encrypt clipboard by selecting the Encrypt clipboard item in applet menu.

Here's a screen shot of the key selection window

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.

#### 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 Encrypt again. The encrypted message will appear in the editor window.

### Decrypting Your Data

#### Decrypting a File From &konqueror;

Left click on the file you want to decrypt. Enter your passphrase and it will be decrypted. You can also drag an encrypted text file and drop it into &kgpg;'s editor window. It will then ask the passphrase and open the decrypted text in &kgpg;'s editor. You can even drop remote files ! You can also use the File Decrypt File and choose a file to decrypt.

#### Decrypting Text or a File With the &kgpg; applet

You can drop an encrypted file or selected text on the &kgpg; system tray applet. You will then be prompted for passphrase, and the decrypted file/text will be saved or opened in the &kgpg; editor depending from how you configured the applet. You can also decrypt clipboard with the decrypt clipboard menu entry of the &kgpg; applet

#### Decrypting a text from the editor

Copy or Drag and Drop the text you want to decrypt, and click on the Decrypt button. You will be prompted for the passphrase.

### Key Management

All basic key management options can be performed through &kgpg;. To open the key management window &LMB; on &kgpg;'s applet. Most options are available with a right click on a key. To import/export public keys, you can use drag and drop or the Copy/Paste keyboard shortcuts.

Here's a screen shot of key management

### Configuring &kgpg;

Configuration is accessible through the &kgpg; applet menu (&RMB; click on the applet). You can set default parameters for encryption, decryption, user interface and applet. Most encryption options are directly related to gpg and are documented in it's man page.

Here's a screen shot of the option dialog

## Credits and License

&kgpg;

Program copyright © 2002-2003 Jean-Baptiste Mardelle bj@altern.org.

&underFDL; &underGPL;
&documentation.index;