Cebulka Blog

OpenKeyChain for Android installation and operation guide

OpenKeyChain is a free Android app for managing PGP keys and encrypting messages. This guide describes how to install and how to use OpenKeyChain on Android.

Installing OpenKeyChain on Android #

  1. Download OpenKeyChain from Google Play or install it using F-Droid.
Google Play 1
  1. If you choose to install via F-Droid, it’s recommended to download and install F-Droid via your computer to ensure you’re downloading from a trusted source. You can find instructions and verify the checksum here: How to install F-Droid.
F-Droid 1
F-Droid 2
  1. Once F-Droid is installed, search for OpenKeyChain and install the app.
F-Droid 4
F-Droid 4

In OpenKeyChain, privacy-threatening functionalities Key Search and Synchronization are enabled by default. Before further use of the app, make sure that the mentioned features were disabled in the app settings.

Generating keys in OpenKeyChain #

  1. Open the OpenKeyChain app and press +.
OpenKeyChain main screen with Generate a New Key option
  1. Select the Create My Key option.
Form for entering name, surname, and email address
  1. Enter your nickname and press NEXT.
Nickname entry screen
  1. Enter your non-existent email address and press NEXT.
Email entry screen
  1. Click on the three dots and then select Change key configuration.
Change key settings screen
  1. Change the key’s password, which will be used to protect it, then change the subkeys to RSA 4096bit and press Save.
Key password setup screen
  1. Set the master key accordingly and press OK.
Master key setup screen
  1. Set the subkey accordingly and press OK.
Subkey setup screen
  1. Press Save.
Save changes screen
  1. Press CREATE KEY.
Create key screen
  1. Wait for the key to be created.
Key creation waiting screen

Backing up the private key in OpenKeyChain #

  1. Go to the key management screen, select your private key, and click Backup Key.
Backup 1
  1. Save the backup code, select the location where you want to save the key, and click Save Backup.
Backup 2
  1. Ensure the key is saved in a secure location.
Backup 3

A backup copy of the private key should be encrypted with VeraCrypt or TrueCrypt and placed on external media for protection against data loss.

Importing public keys in OpenKeyChain #

  1. Open the email or other communication containing the public key.
Import keys 1
  1. Save the public key to a file with a .asc extension; importing a public key from the clipboard is currently not working.
Import keys 2
  1. Open the OpenKeyChain app, select the Import from File option. Select the saved file and click Import.
Import keys 3
  1. The app will import the key and display its details.
Import keys 4

Encrypting messages in OpenKeyChain #

  1. Open the OpenKeyChain app and select Encrypt/Decrypt.
Encryption 1
  1. Select the Encrypt Text option.
Encryption 2
  1. Paste or type the text you want to encrypt.
  2. Select the recipient’s public key from the list of available keys. Then choose one of the options from the top bar: Copy to Clipboard or Share.
Encryption 3
  1. After encrypting the message, copy the resulting text to the clipboard.
  2. You can now share the encrypted text in another app, such as via an instant messenger or save it to a file.
Encryption 4

We do not need to import the public key again when encrypting the next messages. The key will be saved in the application files.

Decrypting messages in OpenKeyChain #

  1. Open the encrypted message in any text editor.
  2. Copy the encrypted text to the clipboard.
  3. Open the OpenKeyChain app and select Encrypt/Decrypt.
Decryption 1
  1. Select the Read from Clipboard option. If prompted for a password, enter the password for your private key.
Decryption 2

Signing messages in OpenKeyChain #

  1. Open the OpenKeyChain app and select Encrypt/Decrypt, then Encrypt Text.
Signing 1
  1. Select your private key.
  2. Paste the message content you want to sign into the text field, then click Copy or Share.
Signing 2
  1. You can now share the signed text in another app, such as via an instant messenger.
Signing 3

Avoid signing messages that seem universal. For example, a signed “I agree” or “It’s me” message can be saved and used to impersonate you in another conversation. Signed messages should be complete sentences describing the purpose and circumstances of the signature.

Verifying messages in OpenKeyChain #

  1. Open the signed message in any text editor.
  2. Copy its content to the clipboard.
Step 1: Paste the signed text into the text field
  1. Open the OpenKeyChain app, go to Encrypt/Decrypt, then click Read from Clipboard.
Step 2: Displaying the verification result
  1. OpenKeyChain will display the verification result, informing you whether the signature is valid.

  2. If the key is not confirmed, it may be highlighted in orange. In such a case:

    • Tap on the key owner.
    • Tap the three dots in the top-right corner and select Confirm with Fingerprint.
    • Check the key’s fingerprint to ensure it matches the expected fingerprint, then confirm the key.
Step 3: Confirming the public key
  1. After confirming the key, the verification process should succeed.
Step 4: Key confirmation after checking the fingerprint

We do not need to import the public key again when verifying subsequent signatures of the same author. The key will be saved in the app data files.


Tags: