# Managing GnuPG keys in cPanel

> Create, import and delete GnuPG keys in cPanel to encrypt and sign email or other data.

Source: https://helpcenter.ruachost.com/cpanel/security/managing-gnupg-keys-in-cpanel/

**GnuPG (GNU Privacy Guard)** is a free implementation of the OpenPGP standard. It allows you to encrypt, decrypt, and sign data or emails, ensuring secure communication. In cPanel, you can generate and manage GnuPG keys directly from the interface.

## Why Use GnuPG Keys?

- **Encrypt sensitive emails** so only the intended recipient can read them.
- **Digitally sign messages** to verify authenticity.
- **Protect data** exchanged between your server and external parties.

## Creating a GnuPG Key

1. **Log in to cPanel.**
2. On the **Tools page → Security section**, click **GnuPG Keys**.
3. Fill in the following fields:

   - **Your Name** → The name associated with the key.
   - **Your Email** → The email address linked to the key.
   - **Comment/Nickname** → Optional identifier.
   - **Key Size** → Choose 1024, 2048, or 4096 bits (larger = stronger security).
   - **Expiration Date** → Optional; set when the key should expire.
   - **Password** → Protects the private key.
4. Click **Generate Key**.
5. The new key pair (public and private) will appear in the list.

## Importing a GnuPG Key

1. In **cPanel → GnuPG Keys**, scroll to **Import Key**.
2. Paste the public key text into the box.
3. Click **Import**.
4. The imported key will now be available for encryption/decryption.

## Viewing and Managing Keys

- **Public Keys** → Can be shared with others so they can send you encrypted messages.
- **Private Keys** → Must be kept secure; used to decrypt messages and create signatures.
- **Delete Keys** → Click **Delete** next to a key if no longer needed.

> **Note:**
- Always back up your private key securely. Losing it means you cannot decrypt messages.
- Use strong passwords for private keys to prevent unauthorized access.
- Larger key sizes (2048 or 4096 bits) provide stronger encryption but may require more processing power.
