How-to Guides / How to use OpenKeychain to PGP encrypt files and text
Easy6 min readUpdated 14 October 2026

How to use OpenKeychain to PGP encrypt files and text

Create a PGP key, share your public key and encrypt or decrypt messages and files on Android.

OpenKeychain is a free, open source Android app for PGP encryption. With PGP you have a public key, which you share so people can encrypt messages to you, and a secret key, which stays on your phone and lets only you decrypt them.

Never share your secret key or its password. Only share your public key.

Install and create your key

  1. Install OpenKeychain using Accrescent or Obtainium. See how to install apps on GrapheneOS.
  2. Open the app and choose Create my key.
  3. Enter your name and an email address. These are visible to anyone who has your public key.
  4. Choose a strong password for the key and finish the setup.
  5. Back up your key: open it from the key list, use the menu and choose the backup option, then store the file and password somewhere safe. Without a backup, losing the phone means losing access to everything encrypted to you.

Share your public key

  1. Open your key from the list.
  2. Use Share to send it as a file or text, or show it as a QR code so someone can scan it.
  3. Ask the other person to send you theirs the same way.

Import someone else's public key

  1. Tap + and choose Import from file, Scan QR code or Import from clipboard.
  2. Check the key details match the person you expect. If you can, confirm the fingerprint with them over another channel before you trust it.

Encrypt text

  1. Tap Encrypt/Decrypt and choose Encrypt text.
  2. Type or paste your message.
  3. Select the recipient's key. Select your own key too if you want to be able to read the message later.
  4. Tap Encrypt, then share the result (a block of text starting with -----BEGIN PGP MESSAGE-----) by any messenger or email.

Decrypt text

  1. Copy the encrypted message.
  2. Open OpenKeychain, choose Encrypt/Decrypt and Read from clipboard.
  3. Enter your key password when asked. The readable text appears.

Encrypt and decrypt files

  1. Choose Encrypt/Decrypt and Select input file.
  2. Pick the file, choose the recipient and encrypt. A new file ending in .pgp or .gpg is created.
  3. To decrypt a file you received, open it with OpenKeychain and enter your key password.

Tips

  • Keep a copy of each recipient's key up to date. Keys can expire.
  • Encrypt first, then upload. You can store the encrypted file in a Cryptomator vault for a second layer of protection.

Comments

Loading comments…

Stuck, or spotted a mistake in this guide? Tell us.