The following article explains how to set up your iPhone or iPad to send and receive encrypted emails via S/MIME. Prerequisite is an S/MIME certificate from a certificate authority. Some CAs provide them free for personal use. The procedure is not very complicated even though the description may look lengthy due to the many screenshots. The biggest hurdle is to pick the correct file format when exporting your S/MIME key on your Mac. (A description on how to export the correct certificate on Windows will follow.)
Set-up for Receiving Encrypted Emails
1. Export your private key in a format that you can import on your iOS devices.
To do this, open “Keychain Access” and find your certificate. Select it and choose “File” / “Export Items”, as shown below.
2. Next, save the certificate in p12 format.
In the process of saving the certificate, as detailed below, you will be asked to provide a password to encrypt your key. This will allow you to send it via email without fear of it being intercepted and used by someone else. Depending on your keychain settings you will also be asked to provide your administrator password to read the privatekey for exporting.
3. Now drag this exported file to your Mail.app icon to send it to yourself.
(Make sure you don’t encrypt it ;)
4. Turn to your iOS device to import the certificate.
Open the email you just sent to yourself and tap on the attachment to import your certificate.
5. Enable S/MIME in advanced mail settings and choose your certificate.
On your iOS device go to “Settings” / “Mail, Contacts, Calendars” / “<Your Account>” / “Advanced” (at the very bottom of your account settings) and activate S/MIME. Important: Make sure you leave the account settings by tapping “done” in the top right of the tool bar. Changes don’t appear to be applied until you do so.
You can also enable signing and encrypting of messages here but more on that in a moment. What we’ve achieved so far is being able to read messages that have been signed with our public key. Unfortunately, sending encrypted messages involves a few more steps and has a few caveats.
Set-up for Sending Encrypted Emails
In order to send an encrypted message, you need to do the following.
1. Import the recipient’s public key.
This happens automatically in Mail.app on OSX but requires some manual interaction on iOS. You may have noticed when looking at signed messages (like the one you sent yourself earlier) that there’s a new little star icon in the blue email address bubble after S/MIME has been activated. This is the UI indicator for signed messages. And the address bubble is also a button that you can tap to bring up address - and certificate - information.
Tapping this button will bring up the address info view:
Tap install to register this public key, which will allow you to send encrypted emails to the key’s owner. You will need to repeat this procedure once for every recipient.
2. Send email.
There’s not really a step two other than making sure you’re sending to the recipient’s correct email address and from your correct account so that the available keys match up with the email addresses used in the process. You can tell that your message is being encrypted by the “Encrypted” string in the title bar of your message:
What’s a bit unfortunate is that there’s no easy way to selectively send encrypted emails. The encryption setting is global for the account under “Settings”, meaning that you have to go there and enable/disable encryption for all messages from that account. It would be nice if that were the default only, with an option to override it in the message composition view.
It would also be nice if public key importing were automatic, like it is on the Mac.
But all in all, it’s nice to be able to read encrypted emails on iOS devices now.