This post is the first in the series on use OpenPG to sign and/or encrypt emails on Android.

In this post, the OpenPGP key manager for Android, APG, is installed and configured.

To follow all of the steps in this guide, you need to have a public and private OpenPGP key.

Now updated to include screenshots of the installation.

Installation

Install APG on your phone.

It should be available through the Android market, if not you can get the apk from Google Code

Transferring Your Keyfiles

First you need to copy the keyfiles onto your phone. On Linux, you should be able to find these in ~/.gnupgp. You will need pubring.gpg and secring.gpg It is best to copy these files onto your SD card by either connecting your phone with a data cable, or by removing the SD card and directly connecting it to your computer. Connecting over any sort of wireless connection reduces the security of the keys, and so is not recommend.

Make sure to remember the location you saved these files to. APG provides a directory on the SD card, named APG, but any accessible directory may be used.

Importing Your Public Keys

Now open up APG on your phone

Click OK on any messages.

Click the physical menu button, and select manage public keys. Here you can import your public keys, as the name suggests.

Click the menu button again, and select import keys. Either enter the directory, or hit the button to browse to the files. If it does, delete any extra text.

Importing Your Private Keys

Now follow the same steps for the secret keys, only select “Manage Secret keys” and “Import secret keys” instead of the public key versions of those options.

Once you’ve done that, you will be done with the basic configuration of APG.

Alternatives

Rather than copying the .gpg files from your home directory, you should also be able to import keys that have been exported, such as those in an ASCII format. However, by copying these files, you also copy all of the public keys of your contacts you had stored with GnuPG, rather than having to import them individually into APG.

The next step is to configure the K9 email client, and will be discussed in the next post in the series.

Comments

Thanks! - D L

I found your series doing a Google search, and I really appreciate the tutorial. I'm slowly learning how to use encryption and digital signatures, and this is a big help in knowing where I can find my files and how to handle them.

Glad to hear it helped - eugene

I too have been teaching myself about encryption and digital signing, my interest being in general in privacy and security. I plan on continuing this series, for both the Android phone and Windows/Linux desktops, so I hope you keep on reading. Currently I am a bit behind on my writing - I just started a new job and I am tackling a big yard project at home, so I hope you can find enough previous articles to keep you going for some time.