Skip to content

Write and Protect a Message

This page shows how to write an email in GpgFrontend and how to protect it.

  • Signing proves the message came from you and was not changed on the way.
  • Encrypting hides the message so only the people you choose can read it.

You can do one, the other, or both. Everything happens on your own computer.

  1. Click File > Workspace > Mail Editor. A new tab opens with an empty message.

Each message is an .eml file. You can save it with File > Save File or File > Save As…, like any other file.

The header fields sit at the top of the message:

  • From: who the message is from. This is you.
  • To: who the message is for.
  • Subject: what the message is about.

To add more people:

  1. Click Cc/Bcc at the end of the To: row (or press Ctrl+Shift+C). Two more rows appear: Cc: and Bcc:.

What these mean:

  • Cc (carbon copy) sends a copy to someone. Everyone can see who was in Cc.
  • Bcc (blind carbon copy) sends a copy in secret. The other readers do not see who was in Bcc.

To add several people in one field, put a semicolon (;) between the addresses. For example: alice@example.com; bob@example.com.

Each address can be written as alice@example.com or as Alice <alice@example.com>.

As you type an address, GpgFrontend suggests matching addresses:

  • In From:, it suggests your enabled mail accounts first, then the addresses on your own private keys.
  • In To:, Cc: and Bcc:, it suggests the addresses on the keys in your key database.

Addresses in Bcc: are never written into the message itself. If they were, every reader could see who got a secret copy.

GpgFrontend still uses these addresses in two ways:

  • In the Message Details window, on the Security tab, they are listed under Keys for these addresses. There you can see which keys you have for them.
  • When you send, it gives them to your mail server, so the Bcc people still get the message.

The Bcc addresses are not saved in the .eml file.

Click in the large area below the header fields and type your message. It shows Write your message here. until you start typing.

  1. Click Attach File… (or press Ctrl+Shift+A).
  2. Pick one or more files and confirm.

You can also drag files from your computer and drop them onto the message.

Each file can be up to 48 MB. Folders cannot be attached. If a file is refused, a window tells you which one and why.

Your attachments are listed under the message. To learn more about the list, see Work With Attachments.

When you open a message you received, the action row shows three buttons:

  • Reply (Ctrl+R): write back to the sender.
  • Reply All (Ctrl+Shift+R): write back to the sender and everyone else who was addressed. People in Bcc are not included.
  • Forward (Ctrl+L): pass the message on to someone else, with its attachments.

Each one opens a new tab with a new message. The original message is not changed.

On a message you are still writing, these buttons are not on the row. You find Send… and Attach File… there instead. Other actions are under More.

Above the body you can switch between two views:

  • Message: the normal view, with header fields, body and attachments.
  • Raw Source: the full message as plain text, exactly as it is stored in the file.

The raw source is read-only at first. To change it by hand:

  1. Switch to Raw Source.
  2. Click Edit Raw Source.
  3. Make your changes. What you type here is the message itself.
  4. Click Stop Editing when you are done.

Most people never need the raw source. It is there for checking or fixing a message by hand.

First pick your keys in the Key ToolBox on the right:

  • To sign: tick your own private key, and only that one. If more than one key is ticked, a Multiple Keys Selected window appears and nothing is signed.
  • To encrypt: tick the public key of each person who should read the message. Every ticked key becomes a recipient, and no other key is added. GpgFrontend does not add your own key by itself. Tick it too if you want to read the message later. This also goes for the copy in your Sent folder: it is the encrypted message, so without your own key you cannot open it.

Then use the Security menu. This is the menu that opens from the status button:

  1. Find the status button at the right end of the action row. The action row is the row of buttons above the message body. On a new message the status button says Not signed or encrypted.

  2. Click the status button. The Security menu opens.

  3. Choose one:

    • Sign…: sign the message.
    • Encrypt…: encrypt the message.
    • Encrypt and Sign…: do both at once. This is the best choice for a private message.

    The Security menu of a new message

With Encrypt and Sign…, the ticked keys are the recipients. A Select Signing Key(s) window then opens. Pick the one key to sign with, and click Confirm. The message is signed first and then encrypted, so the signature is hidden inside the encrypted message.

The result shows in the Status Panel. The status button changes to tell you what the message is now, for example Encrypted.

Encryption does not hide everything. Before you send, read What Encryption Hides and What It Does Not.

You can also use the Sign and Encrypt buttons on the main toolbar. They do the same thing. Encrypt & Sign is in the Operations menu. If you added it to the toolbar, it is in the Encrypt button’s list.

The menu changes with the message. This is what you see:

The message is… The menu offers
Not signed or encrypted Sign…, Encrypt…, Encrypt and Sign…
Signed Verify Signature, Signature Details…, Sign Again With Another Key…, Remove Signature…
Encrypted Decrypt, Decrypt and Verify, Encryption Details…
Encrypted and signed Decrypt and Verify, Decrypt, Details…, Remove Signature…
Broken What Is Wrong With This Message?, Try to Verify Anyway, Try to Decrypt Anyway

“Broken” means the message says it uses OpenPGP, but it is not built the right way. To learn how to check a message you received, see Verify and Inspect a Message.

What Encryption Hides and What It Does Not

Section titled “What Encryption Hides and What It Does Not”

Encryption locks the content of a message. But some parts must stay readable, so that mail servers can deliver it. Know what others can see before you send.

Part of the message Who can read it
The body text Only the people you encrypted to
Attachments and their file names Only the people you encrypted to
The Subject Only the people you encrypted to. On the outside it shows as ....
From, To, Cc, Date and the other header lines Anyone who handles the message, such as mail servers
The key IDs the message was encrypted to Anyone who has the message, including every recipient

The real subject is kept inside the encrypted part, so the people you encrypted to still see it. The message ID (a code that names the message) is a header line too, so it also stays readable.

When you sign, GpgFrontend also attaches your whole public key, as a file named OpenPGP_0x followed by your key ID and .asc. Every name and email address on that key can be read by anyone who gets the message.

  • With Sign… only, that includes mail servers.
  • With Encrypt and Sign…, the key is inside the encrypted part. Only the people you encrypted to can see it.

If a key holds a name or address you do not want to share, sign with another key.

Each encrypted message lists the key IDs it was encrypted to. A key ID is a short code that names a key. So every recipient can see which keys the others used. This includes a key you ticked for a Bcc person. See About Bcc.

You Cannot Read Your Own Message Unless You Add Your Key

Section titled “You Cannot Read Your Own Message Unless You Add Your Key”

GpgFrontend encrypts only to the keys you tick. It does not add your own key by itself. If you do not tick your own key, you cannot open the message later, not even the copy in your Sent folder. See Sign or Encrypt the Message.

Once a message is signed or encrypted, you cannot edit it. A notice above the body tells you why:

  • Signed: a change under a signature would look like a forgery. To edit, first remove the signature with Remove Signature… in the Security menu.
  • Encrypted: decrypt it first.
  • Encrypted and signed: decrypt it, then remove the signature.

If you try to change a signed message anyway, a Message Is Signed window asks: “Remove the signature and make it an ordinary message?” Click Yes to remove the signature, or Cancel to keep it.

You can also lock a message you received, so nobody changes it by accident. This is only offered for a message that is not signed or encrypted. Signed and encrypted messages are locked already.

  1. Click More.
  2. Click Read-only. A Read-only label appears.

Reply and Forward still work, and they make new messages. To unlock, click More > Read-only again.

You have two choices:

  • Send it from GpgFrontend. Click Send… (or press Ctrl+Enter). You need a mail account for this. See Send a Message.
  • Send it with another email app. Save the message as an .eml file with File > Save As…. Then open or import that file in your usual email app and send it from there.

Before the file is saved, GpgFrontend takes a last look at the message. If something looks risky, it shows a Check before exporting window. See Check Before Exporting.

After you sign, encrypt, verify or decrypt, the Status Panel shows the result as a set of cards:

  • E-Mail: the message headers: From, To, Subject, CC, BCC and Date.
  • OpenPGP: two technical values about the signature:
    • Digest of Signed MIME Entity (SHA-256): a fingerprint of the exact part of the message that the signature covers. If two copies show the same value, the signed part is the same in both.
    • Declared Signature Hash (micalg): the hash method the message says its signature uses. This is only what the message claims.
  • Attachments: each file in the message. It also says when a file is an OpenPGP key, or when it is not covered by the signature.
  • Recipient Check: for encrypted mail, whether each person in the headers can really read it. A warning here means someone was addressed but not encrypted to, so they cannot open it.
  • Encryption Recipient: who each copy was encrypted to, shown as the key’s name and Key ID.
  • Send… is grayed out. Hover over the button. A tip tells you what is missing, for example a subject, a recipient or a mail account.
  • A signature shows as bad, but the text looks fine. A signature covers the exact bytes of the message. Some programs change line endings or re-encode a message when they save or forward it. When you can, save the original .eml file instead of a copy.
  • You cannot decrypt a message. Check that the matching private key is in the key database you are using right now.
  • The reader cannot open your message. Make sure their email app supports PGP/MIME. Apps that only know older “inline PGP” may not open it.
  • A message shows Not signed or encrypted, but its text has -----BEGIN PGP MESSAGE----- or -----BEGIN PGP SIGNED MESSAGE----- in it. This is inline PGP: the protected text sits right in the body. Mail tabs do not decrypt or verify it. Copy that text, paste it into a text tab (File > Workspace > New Text Editor), and decrypt or verify it there. See Decrypt Text.
  • Keep private keys safe. Never upload them to an email provider.

You can skip this section.

Show the technical details
  • GpgFrontend builds messages in the PGP/MIME format (RFC 3156). The signing and encrypting are done by the engine of your key database, GnuPG or rPGP (see Engines and Compatibility). Both use the OpenPGP format. That format was first set out in RFC 4880, which RFC 9580 has since replaced. The messages work with Thunderbird and other OpenPGP email apps.
  • It makes PGP/MIME messages, not inline PGP. A signed message has its signature in a separate part. An encrypted message is wrapped as one encrypted part. This keeps the body, attachments and formatting intact.
  • It does not read or write inline PGP, and it does not support Autocrypt (a way some email apps swap keys by themselves, through a mail header).
  • .eml files work almost everywhere. You can always move a message to or from another email app.