PGP and Autocrypt
PGP encrypts mail end to end: only you and the other side can read it: not the mail server, not your provider, nobody in between. PGP can also sign mail, making it provable that it really came from you and was not altered on the way.
The price: both sides need PGP. You can only encrypt to people whose public key you have.
The principle in three sentences
Section titled “The principle in three sentences”Every participant has a key pair. The public key may be held by anyone, and it is used to encrypt mail to you. The private one stays with you, and only it can decrypt and sign.
Your own key pair
Section titled “Your own key pair”Under Settings → Security → PGP Encryption:
- Generate new key: YouniqMail creates the pair for your address right on the device. The private key never leaves it unless you export it yourself. A passphrase is optional; with Remember passphrase on this device YouniqMail does not ask for it again.
- Or Import key: in the form Import existing key you paste the key as ASCII text (anyone who has worked with GnuPG, Thunderbird or ProtonMail simply brings their pair along).
For a key with a passphrase you can store it later with Store passphrase. If you have not stored it, YouniqMail asks for it when you send. Tick Remember passphrase there to keep it for 5, 15, 30 or 60 minutes; Forget discards it sooner. A mail that waits in the outbox across a restart needs the passphrase again: open it from the outbox and send it anew. Files in encrypted mails may ask for it once more.
Exporting works at any time, say for backup or the second machine. Treat the private key’s export file like a password. A full backup contains your private keys as well, sealed to this device: after a restore on another computer the key shows Not readable on this device until you import its key file again.
You can also copy the public key to the clipboard. YouniqMail saves the private key only as a file, after asking first, and never puts it on the clipboard, because other apps and often your other devices can read it.
If you delete your key pair, the private and the public part go together. Encrypted mails that YouniqMail has already decrypted keep their text on this device. Files in these mails, mails not yet decrypted and the copies on your other devices can no longer be opened afterwards, and the signatures of your older mails can no longer be confirmed. So save the key as a file first if you may need it again. A key under Trusted public keys that is marked as your address has no private key on this device, for instance because it is left over from a key pair you deleted earlier. YouniqMail never encrypts your own copy of a mail to such a key.
Other people’s keys
Section titled “Other people’s keys”Five ways to get public keys:
Autocrypt, the convenient one: Mail programs with Autocrypt (Thunderbird, K-9 Mail, Delta Chat and others) place the public key into every email automatically. YouniqMail reads it out and remembers it. After the first email from an Autocrypt user you can reply encrypted without fetching their key separately. You still need a key pair of your own for that, since YouniqMail encrypts every mail for you as well. In turn, YouniqMail places your own public key into every mail you send, so the other side gets it the same way; in encrypted group mails it also passes on the keys of the other recipients (“gossip”). YouniqMail remembers no key from emails in the spam folder, from blocked senders, or from emails whose sender the mail server considers forged.
Key servers: In the Keyserver section of the same settings page you search public directories for an address and import the match. That does not confirm the key yet, since anyone can upload a key under any address to a key server. Compare the fingerprint with its owner and click Trust key under Trusted public keys. Only then does YouniqMail encrypt to it.
By hand: Paste a key block someone sent you, with Import key. A key you paste yourself counts as trusted right away, unlike one from a key server.
As a QR code: Show QR next to a key shows the public key as a QR code. Scan QR… in the Keyserver section reads such a code from an image file and imports the key.
As an attachment: If someone sends you their key as a file (.asc,
.gpg, .pgp or .key), YouniqMail usually picks it up during the
sync already. Otherwise click Import key on the attachment. That
does not confirm the key yet: compare the fingerprint in the notice with
the sender, and only then click Trust. YouniqMail never takes
private keys from emails.
YouniqMail does not take in keys by itself from the spam folder or from blocked senders.
A key you have confirmed always comes first. If another key arrives for the same address later, by Autocrypt, passed on in a group mail or as an attachment, YouniqMail keeps encrypting to the key you confirmed and shows you the new one: in the compose window under Check keys, in the settings and in the contact details. There you decide whether to trust the new key, reject it or keep the one you confirmed. Compare the fingerprint with the owner another way first, because anyone can put any sender on a mail.
Under Autocrypt in the same settings you see your Autocrypt peers and set for each account whether to announce Prefer encryption for this account (default: no preference). That switch affects other mail programs with Autocrypt: they then encrypt their mail to you by default.
Encrypting and signing
Section titled “Encrypting and signing”In the compose window, the switches for Encrypt and Sign sit in the footer. If a key is on file for every recipient, the mail can be encrypted; if one is missing, YouniqMail tells you whose. Encrypt switches on by itself for any mail as soon as there is a usable key for every recipient and for your own sender address. An exception are keys that YouniqMail knows only from a group mail or that their owner has not announced for more than 35 days: then the compose window shows Autocrypt via gossip or Autocrypt stale, and you switch Encrypt on yourself if you want to. Autocrypt available shows that encryption is possible with Autocrypt keys, Autocrypt that all recipients also prefer encrypted mail.
Sign follows Encrypt on its own: an encrypted mail is signed
too, any other is not. You can still sign only, for any mail:
tick Sign on its own, and Signed only appears next to the
switches. The mail goes out as PGP/MIME, the format Thunderbird and
other mail programs check. Recipients with PGP can see that it really
comes from you and was not changed on the way. Anyone without PGP
reads it as usual and sees the signature as an attachment named
OpenPGP_signature.asc. A mail that is only signed can still be read
on its way: the signature protects against changes, not against
prying eyes.
If a key is missing or was revoked, you find out when you click Send, not later in the outbox. If a key has expired, YouniqMail does not encrypt to it and says so in the compose window already. Ask for a current key, or refresh it from the keyserver in the settings.
When you reply to an encrypted mail, the reply goes out encrypted too. In the compose window, Encrypt is already switched on for it when there is a key for every recipient. Quick Reply below a mail and the reply typed straight into a notification encrypt the same way, and Quick Reply shows so above its input field. Where that is not possible, say because a key is missing or your key needs its passphrase to sign, YouniqMail sends nothing. Quick Reply then names the reason and offers Reply in the compose window, which takes over your text and its attachments. A reply from a notification (Pro, macOS and Windows only) opens in the compose window right away.
If a reply to an encrypted mail or a forward of one is to go out unencrypted after all, YouniqMail asks first, unless you switched Encrypt off yourself. Encrypted mail has no emoji reactions, since a reaction would be a mail of its own, sent unencrypted. And the answer to an encrypted meeting invitation goes out without the event’s title, time and place.
Drafts go to the Drafts folder on the server encrypted to your own key. This applies when Encrypt is switched on, and to every reply to an encrypted email and every forward of one, even if you end up sending it unencrypted. That way the server cannot read them, and you continue the draft on another device as usual. If you have neither a key of your own nor an S/MIME certificate for the sender, the draft stays on this device, and YouniqMail tells you so when it saves it. An S/MIME certificate counts for this only with Pro.
A draft that YouniqMail saves anew because it was edited or deleted on another device while it was open here stays encrypted as well. When you reopen a draft, Encrypt and Sign are set the way you left them. If a draft with encrypted content comes from another device, YouniqMail switches Encrypt on when there is a key for every recipient.
Received mail
Section titled “Received mail”Encrypted mail opens as usual, and decryption happens automatically with your private key. If it is protected by a passphrase you have not saved, YouniqMail asks for it when you open the mail.
YouniqMail keeps the decrypted text in its local database, so search and display work. On the device it is protected by storage encryption. Notifications for an encrypted mail show only Encrypted message.
YouniqMail checks signatures on its own, in encrypted and in signed
only mail alike. That includes mail whose text stands between
BEGIN PGP SIGNED MESSAGE and the signature, as mailing lists often
send it; it is shown without that frame. Above the text you see what
the check found. In an encrypted mail with a valid signature nothing
appears above the text; the green PGP badge shows the result in its
tooltip.
- PGP signature verified: the signature holds, and the key belongs to the sender and is marked as trusted on your side.
- PGP signature valid, but it covers only part of the mail: the signature holds, but the email shows more than what is signed: further text before or after the signed text, or attachments. This happens with signatures that sit in the text of the email, for example when a mailing list adds a footer. What is not signed may come from someone else.
- PGP signature valid, key not confirmed: the signature holds, but you have not confirmed the key yet, for example because it came by Autocrypt or with the mail itself. Compare the fingerprint with the sender and mark the key as trusted: open the sender’s contact details from the mail and click Trust next to the key in the tab PGP Keys, or Trust key under Settings → Security → PGP Encryption.
- PGP signature from someone else: the signature holds, but the key does not belong to the sender’s address, or you rejected it.
- PGP signature invalid: the mail was changed after signing, or the key had expired or was revoked when it signed.
- PGP signature not checked: the sender’s key is not on this device.
- PGP signature could not be checked: the signature could not be read. In an encrypted mail the reason can be that YouniqMail has to decrypt the mail once more for the check and your key needs its passphrase. Click Check again in the notice: YouniqMail asks for the passphrase, uses it for this one check and does not save it. Once you save the passphrase in the settings, YouniqMail checks such mails again by itself.
A mail can name several senders. YouniqMail shows the first one as the sender, and a signature counts only for that one. The others are listed in the line Other senders, next to the recipients. If the signature comes from one of them, the mail reads PGP signature from someone else.
The mail list shows the same as a small badge (switched off under Settings → Email List with Show PGP badge), and the signature file itself does not appear as an attachment. When you import a key later or change whether you trust it, YouniqMail checks the mails signed with it again: an open mail right away, all others the next time you open them. In encrypted mail this works only when your key opens without a passphrase.
If a key you confirmed is revoked, YouniqMail falls back to another key of that address that you have not confirmed and tells you so. Refresh from server fetches the current state of a key, Revalidate checks it again.
Signed-only messages in the BEGIN PGP MESSAGE format, as
gpg --sign --armor creates them, are checked too, and their text is
shown readable. An encrypted block that a mail only quotes or attaches
as a file does not take the mail’s place. The mail stays readable as
it was written.
Mail that arrives in bulk with the first sync of a folder is checked the first time you open it, fetching the original from the server once. If the server cannot be reached, it says PGP signature not checked yet, and the check runs again the next time you open it.
Limits, named honestly
Section titled “Limits, named honestly”PGP encrypts the content, not the metadata: subject, sender and recipients stay readable. And search can only look into encrypted content as far as it is available decrypted locally. For confidential communication, PGP remains the standard that has held up for decades.