This post is the second in the series on using OpenPG to sign and/or encrypt emails on Android.
This guide covers the setup of the K9 email client on Android for use with APG in order to encrypt and sign emails with OpenPGP. It also covers other basic options in K9, such as setting email signatures for outgoing messages, and how to send emails.
This guide requires that the steps in Installing and Configuring APG be implemented on your phone first.
Updated to include picutures
Start by installing the K9 email client. K9 should be available through the Android Market, or you can download the APK from Google Code.
Setting Up You Email Accounts
Click the next button.
Make sure that your email is IMAP or POP enabled, and configure the options K9 presents you as you would any email client.
Once the configuration is complete, the email in your inbox should download.
Adding Additional Email Accounts
In order to add a new email account, K9 must have the listing of accounts open, rather than a particular email account.
While at this list, press the menu button on your phone, and select "Add Account". Follow the same steps for adding the new email address as you did when you added the first account.
[img_assist|nid=217|title=Adding an Account|desc=|link=popup|align=center|width=200|height=133]
Configuring Email Signatures
Each account has a separate signature. For each account you must have the inbox for the account open to set the signature.
While in the account, push the menu buttton, and select "more", select "Settings", select "Account Settings", "Sending Mail", and finally "Composition Defaults".
The signature can be set from here, as well as disabling it, or modifying other aspects of message composition.
[img_assist|nid=218|title=Adding a Signature|desc=|link=popup|align=center|width=200|height=133]
To send a message, click the menu button and select compose
After you have composed your message, hit the menu button again and you will see the available options, which include send.
[img_assist|nid=219|title=Push the menu button to send|desc=|link=popup|align=center|width=200|height=133]
Configuring K9 to Use Encryption
Setting K9 to Send Text Emails
Using OpenPGP with encryption on any platform works better with text email. When using HTML mail, it is likely that your recipient will find themselves unable to decrypt the message.
Set text only mail by pressing the menu button in the email account's screen, selecting "more", selecting "settings", selecting "account settings", selecting "sending mail", and finally selecting "plain text" under "message format".
[img_assist|nid=220|title=You should find this dialog|desc=|link=popup|align=center|width=200|height=133]
Making sure that K9 uses APG
From within each account, hit the menu button, then select "settings", then "Privacy".
Scroll down to "Cryptography", and select it.
Make sure that OpenPGP Provider is set to APG.
Navigate to the "Cryptography" (as before) and select the Autosign option
This option automatically signs every email you send.
Using Encryption and Signing in K9
If you receive an encrypted email, you will be prompted for your passphrase when you select the encrypted message. Additionally, if a message has been signed and you already have the public key of the individual who sent it, K9 will automatically check to see if the signature is valid.
[img_assist|nid=222|title=The pen with a checkmark means the signature checks out.|desc=|link=popup|align=center|width=200|height=133]
If you are trying to send an encrypted message, there are two options near the top of the "Compose" screen that allow you to either sign or encrypt an email, as well as allowing you to select both.
Once you have finished composing the email, select the send option; you will be prompted with a list of keys currently stored in AGP. Choose the appropriate key from this list.
[img_assist|nid=224|title=Choosing the key|desc=|link=popup|align=center|width=200|height=133]
If the key you need is not in AGP, it can be added through the APG application. Once you have selected the key, or keys, you will be prompted for the passphrase for your private key.
[img_assist|nid=225|title=Entering your passphrase|desc=|link=popup|align=center|width=200|height=133]
After you enter the passphrase, your email will be encrypted and sent out.
K9 should now be configured to send encrypted or signed emails. Now that you have the initial configuration done, sending encrypted and/or signed emails is easy, as is receiving them.
Images of Sending and Receiving Encrypted Emails
Sending the Encrypted Email
[img_assist|nid=226|title=Sending the Encrypted Email|desc=|link=popup|align=center|width=500|height=333]
[img_assist|nid=224|title=Selecting the Key to Encrypt With|desc=|link=node|align=center|width=480|height=320]
[img_assist|nid=225|title=Entering the Passphrase|desc=|link=popup|align=center|width=480|height=320]
Receiving the Encrypted Email
[img_assist|nid=228|title=Decrypt the messag eby entering the passphrase to your secret key.|desc=|link=popup|align=center|width=333|height=500]
[img_assist|nid=222|title=Now you can read the secret message|desc=|link=popup|align=center|width=480|height=320]