Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

PGP on Android: Setup Guide for Secure Email

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Adding PGP (Pretty Good Privacy) support on Android lets you encrypt, decrypt, and sign emails and files so only the intended recipient can read them. This guide shows you how to set up OpenKeychain (the standard PGP app for Android) and connect it to your email app, giving you end-to-end encryption for your messages. You'll need an Android phone or tablet, an existing email account, and a few minutes to generate your keys.

What You'll Need

  • An Android device running Android 6.0 or newer (most modern devices qualify).
  • A Google Play Store account to download apps.
  • Your email account credentials (for setting up the email client).
  • Optional: A computer to back up your keys, but not required.

Step-by-Step

  1. Install OpenKeychain from the Google Play Store. Open the Play Store app, search for “OpenKeychain,” and tap Install. This app manages your PGP keys and integrates with other apps.
  2. Install a compatible email client. OpenKeychain works with several email apps. The most common are K-9 Mail (free) and the built-in Gmail app (limited support). For full PGP functionality, install K-9 Mail from the Play Store. If you prefer Gmail, note that it only supports PGP via external apps, so K-9 is recommended for this guide.
  3. Open OpenKeychain and create your key. Launch OpenKeychain. On the first screen, tap “Create a key.” You'll be asked to enter your name and email address. Choose a strong passphrase — this protects your private key. Tap “Create” and wait for the key to generate (it may take a minute).
  4. Back up your key (important). After creation, OpenKeychain will prompt you to back up your key. Tap “Back up” and choose a location like Google Drive or a file manager. This backup is a file containing your private key, so store it securely. If you lose your phone, this backup lets you restore your keys.
  5. Set up your email client with OpenKeychain. Open K-9 Mail. If you haven't set up your email account yet, do so by tapping “Add account” and entering your email and password. Once your inbox loads, go to Settings (the three-dot menu) > “Account settings” > “Cryptography.” Enable “Use OpenKeychain” and select your key from the list.
  6. Test encryption with a friend. To send an encrypted email, you need the recipient's public key. Ask them to share it, or import it from a keyserver. In K-9 Mail, when composing an email, tap the lock icon to enable encryption. If you have the recipient's public key, the email will be encrypted. To receive encrypted emails, your public key must be shared with others — you can export it from OpenKeychain by tapping your key and choosing “Share.”
  7. Sign your emails (optional). Signing proves the email came from you. In K-9 Mail's compose screen, tap the pen icon to sign. This works even if the recipient doesn't use PGP, but they'll see a signature attachment.

Common Mistakes

  • Forgetting to back up your private key. If you lose your phone without a backup, you lose access to all your encrypted messages.
  • Using a weak passphrase. A short or common passphrase can be guessed, compromising your private key.
  • Sharing your private key. Only your public key should be shared. Your private key must remain secret.
  • Expecting Gmail to work seamlessly. Gmail doesn't natively support PGP; you need a client like K-9 Mail that integrates with OpenKeychain.
  • Not importing the recipient's public key before sending. If you try to encrypt without the public key, the app will fail or send unencrypted.

Tips

  • Use a password manager to store your passphrase if you're prone to forgetting.
  • Share your public key via a QR code for easy exchange — OpenKeychain can display it as a QR code.
  • Update OpenKeychain regularly to get security patches and new features.
  • Consider using a dedicated email address for PGP to keep encrypted messages separate from regular mail.
  • Learn about key revocation — if your private key is compromised, you can revoke it to invalidate it.

Troubleshooting

If encryption doesn't work as expected, try these steps in order:

  1. Restart both apps. Close OpenKeychain and K-9 Mail completely, then reopen them.
  2. Check that your key is selected. In K-9 Mail's cryptography settings, ensure your key is chosen and not expired.
  3. Verify the recipient's public key. If encryption fails, the recipient's key might be missing or outdated. Re-import it.
  4. Update OpenKeychain and K-9 Mail. Outdated versions can cause compatibility issues.
  5. Re-import your backup. If the app crashes, uninstall and reinstall OpenKeychain, then restore your key from the backup file.

If nothing works, visit the OpenKeychain website for community support.

Frequently Asked Questions

Is PGP the same as end-to-end encryption?

PGP is a method that provides end-to-end encryption. When you encrypt with PGP, only the holder of the private key can decrypt, so it's end-to-end by design.

Can I use PGP with Gmail?

Gmail doesn't natively support PGP. You can use third-party apps like K-9 Mail that integrate with OpenKeychain, but Gmail itself won't encrypt.

What happens if I lose my phone?

If you backed up your private key, you can restore it on a new device. Without a backup, your encrypted messages are unrecoverable.

How do I get someone else's public key?

Ask them to share it via email, QR code, or a keyserver. In OpenKeychain, you can scan a QR code or import a key file.

Is PGP legal to use?

Yes, PGP is legal in most countries. Some countries have restrictions on encryption, but for personal use it's generally allowed.

Can I encrypt files other than email?

Yes, OpenKeychain can encrypt files. In any file manager, share a file and choose “Encrypt” with OpenKeychain.