GnuPG and Enigmail Tips

A collection of tips related to GnuPG and Enigmail. For GnuPG and related topics see also my GnuPG bookmarks.

Installing GnuPG and Enigmail on Windows with Thunderbird

Deutsche Version weiter unten / German version further down.

An attempt to explain GnuPG and Enigmail installation to a Windows user who already uses Thunderbird. Note that I do not run Windows and can't verify, this is just how it should work as far as I understood.

First obtain GnuPG. For Windows there is a packet with an installer, go to the download page and scroll down to the Binaries section where you find FTP links on the right hand side.

To verify that you got the original version and it wasn't exchanged during transport, e.g. by a manipulated cache or so (yes, this is paranoid ;-) you should check the integrity. If this is your first time GnuPG installation you can't use it to check itself. As Windows doesn't come with tools for this task, you can download a sha1sum executable from the GnuPG ftp site. In a command line window change to your download directory and enter the command (this for version 1.4.8 that was current at the time of writing)

sha1sum gnupg-w32cli-1.4.8.exe

and compare the output with the SHA1 signature that is published by the GnuPG developers on the integrity check page, which for v1.4.8 was

6ef3f9ba7a36ad1da53a02a8733bf77bc5305587  gnupg-w32cli-1.4.8.exe

Adapt the command and the ouput for a different version than v1.4.8 of course.

If the signature hash doesn't match the published one, be suspicious and do not use that binary. If in doubt ask someone who is familiar with these things and can check the downloaded binary's integrity for you.

If you don't know what a command line window is or how to get one or how to change to the directory where your downloaded files reside, either ask someone for help or try this:
click Start → All Programs → Accessories → Command Prompt
and, let's assume your download directory is C:\Documents and Settings\UserName\My Documents enter the following commands, including the " double quotes:

c:
cd "\Documents and Settings\UserName\My Documents"
sha1sum gnupg-w32cli-1.4.8.exe

If all is fine and the signature matches, get Enigmail. Note that if Firefox is your browser you'll have to right click the download URL on that page and choose Save Link As... from the context menu, otherwise Firefox would attempt to install the .xpi file as a Firefox Add-On extension package.

There are quite detailed instructions on the Enigmail web site for how to use GnuPG and Enigmail.

A short summary follows. If you want to use GnuPG with multiple Windows user accounts install the package using the Administrator account and after having added the installation directory to the PATH environment variable switch back to your user account to proceed.

  1. If needed, switch to the Administrator account.
  2. Run gnupg-w32cli-1.4.8.exe and accept the defaults of the installation wizard.
  3. Add the path to the gpg.exe executable file from the installation defaults to the Windows PATH environment variable.
    Help: Enigmail GnuPG Setup Guide, install.
  4. If needed, switch back to your user account.
  5. Similar to PATH, but instead of editing an already existing variable add a new environment variable GNUPGHOME to the User environment variables and let it point to a directory where GnuPG should manage the keyring data files for this user, e.g. C:\Documents and Settings\UserName\Applications\gnupg
  6. Check if the installation was successful.
    Help: Enigmail GnuPG Setup Guide, restore.
    Ignore the "restore keyrings" part, as this is your first installation.
  7. Install the downloaded Enigmail .xpi file in Thunderbird's Extension Manager from the Tools menu.
  8. Quit all Thunderbird instances and then restart it.
  9. Configure Enigmail.
    Help: Enigmail Quickstart Guide and Enigmail Configuration Manual.
  10. Enable PGP/MIME instead of the old-fashioned inline-PGP method. In Thunderbird's Account Settings go to OpenPGP Security and enable Always use PGP/MIME.
    Help: Per Account Settings.
    You may receive complaints from users of Windows-Outlook-Express that your mails have an empty attachment if they are PGP/MIME signed. That's just because Outlook-Express is a bit dumb and doesn't know about the PGP/MIME standard. Point out to those worried users that they better should use a modern mail client, for example Thunderbird.
  11. To let Enigmail always sign all messages, activate also Sign non-encrypted messages per default in the same dialog, additionally to Sign encrypted messages by default.
  12. To encrypt messages to all recipients for whom you have a public encryption key, activate also Encrypt messages by default.
  13. To be prompted with a confirmation dialog before sending any messages, so that you can check the encryption/authentication status, activate under OpenPGP → Preferences → Sending the option Always confirm before sending.
    Help: Enigmail Configuration Manual, Sending.

For an overview of the steps of key pair generation see Enigmail GnuPG Setup Guide, Creating a key pair and its revocation certificate. However, use of command line as described there is not necessary, you can use the Enigmail OpenPGP Key Manager UI instead, but the remarks about key length and revocation certificate are valid nevertheless. Enigmail comes with a wizard that is run the first time you use the OpenPGP → KeyManager menu and guides you through this process. For the curious there are some sneak preview screenshots available. You should complete the wizard, as when having cancelled it it isn't offered anymore and a manual restart involves editing the prefs.js file, see further down.

Many thanks to Zoë, without her suffering I wouldn't had created these instructions ;-)

GnuPG und Enigmail auf Windows mit Thunderbird installieren

Ein Versuch einem Windows Benutzer zu beschreiben, wie GnuPG und Enigmail zu installieren sind wenn Thunderbird schon benutzt wird. Ich benutze Windows nicht und kann das nicht überprüfen, aber so sollte es funktionieren wenn ich es richtig verstanden habe.

Indem du Thunderbird benutzt hast du schon mal die erste Hürde genommen und kannst Enigmail verwenden. Outlook-Express-Benutzer haben es da schwieriger.

Zuerst GnuPG holen. Für Windows gibt es ein Paket mit Installer, gehe zur Download Seite und scrolle zu Binaries wo auf der rechten Seite FTP links zu finden sind.

Um sicher zu stellen, dass es die originale Version ist und nicht auf dem Transportweg durch z.B. einen modifizierten cache manipuliert wurde (ja, das ist paranoid ;-) solltest du die Integrität überprüfen. Da Windows nichts dafuer bietet dazu das sha1sum Programm downloaden und dann im Kommandozeilenfenster in deinem Download-Verzeichnis das Kommando (dies für Version 1.4.8, die zum Zeitpunkt des Schreibens aktuell war)

sha1sum gnupg-w32cli-1.4.8.exe

eingeben und die Ausgabe mit der von den GnuPG Entwicklern veröffentlichten SHA1 Signatur vergleichen:

6ef3f9ba7a36ad1da53a02a8733bf77bc5305587  gnupg-w32cli-1.4.8.exe

Für andere Versionen als 1.4.8 natürlich Kommandozeile und Ausgabe anpassen.

Wenn die Signatur nicht mit der veröffentlichten übereinstimmt, werde misstrauisch und installiere die Datei nicht. Im Zweifel frage jemanden, der mit der Materie vertraut ist, und die Integrität des Downloads überprüfen kann.

Wenn du nicht weisst, was ein Kommandozeilenfenster ist oder wie du eins bekommst oder wie du zu dem Verzeichnis wechseln sollst, in dem die ge-download-eten Dateien liegen, bitte entweder jemanden um Hilfe oder versuche dies:
klicke Start → Alle Programme → Zubehör → Kommandozeile
und, angenommen dein Download-Verzeichnis sei C:\Dokumente und Einstellungen\BenutzerName\Eigene Dateien gib das folgende inklusive der " doppelten Anführungsstriche ein:

c:
cd "\Dokumente und Einstellungen\BenutzerName\Eigene Dateien"
sha1sum gnupg-w32cli-1.4.8.exe

Wenn die Überprüfung der Signatur positive verlaufen ist besorge Enigmail. Beachte, dass wenn dein Browser Firefox ist, du den dort angegebenen Download-URL mit der rechten Maustaste anklicken und dann aus dem Kontextmenue Save Link As... zum Speichern wählen musst, anderenfalls würde Firefox versuchen, die .xpi Datei als Firefox Add-On Erweiterung zu installieren.

Es gibt eine sehr ausführliche Anleitung in Englisch, wie GnuPG und Enigmail zu installieren und zu benutzen sind. Eine deutsche Seite zur Benutzung von Enigmail gibt es auch.

Kurz abgerissen der Vorgang. Wenn du GnuPG mit mehreren Windows-Benutzern benutzen willst, installiere es mit dem Admin-Benutzer und nachdem du das Installationsverzeichnis zu der PATH Umgebungsvariable hinzugefügt hast fahre mit deinem Benutzer-Konto fort.

  1. Wenn erforderlich, als Administrator anmelden.
  2. gnupg-w32cli-1.4.8.exe zur Installation ausführen, die Voreinstellungen übernehmen.
  3. Den Pfad zur ausführbaren Datei gpg.exe aus den Voreinstellungen zur PATH Umgebungsvariable hinzufügen.
    Hilfe: Enigmail GnuPG Setup Guide, install.
    Anmerkung: In einem deutschen Windows ist der dort angegebene Programmpfad ggbf. von C:\Program Files\GNU\GnuPG nach C:\Programme\GNU\GnuPG abzuändern.
  4. Wenn erforderlich, wieder mit deinem Benutzer anmelden.
  5. Ähnlich wie bei PATH, nur anstatt eine bereits existierende Variable zu editieren eine neue Umgebungsvariable GNUPGHOME den Benutzervariablen hinzufügen und diese auf ein Verzeichnis zeigen lassen, in dem für diesen Benutzer die keyring Dateien verwaltet werden sollen, z.B. C:\Dokumente und Einstellungen\BenutzerName\Anwendungsdaten\gnupg
  6. Prüfen, ob die Installation erfolgreich war.
    Hilfe: Enigmail GnuPG Setup Guide, restore.
    Den restore keyrings Teil ignorieren, da dies deine erste Installation ist.
  7. Enigmail installieren, dazu die heruntergeladene .xpi Datei in Thunderbird's Extension Manager aus dem Tools Menü installieren.
  8. Thunderbird beenden und neu starten.
  9. Enigmail einrichten.
    Hilfe: Enigmail Quickstart Guide und Enigmail Configuration Manual.
  10. Aktiviere PGP/MIME anstatt der alten inline-PGP Methode. In den Thunderbird Account Settings gehe zu OpenPGP Security und aktiviere Always use PGP/MIME.
    Hilfe: Per Account Settings.
    Vielleicht bekommst du von Windows-Outlook-Express-Benutzern Beschwerden, dass deine Mails leere Anhänge hätten, wenn sie PGP/MIME signiert sind. Das ist nur, weil Outlook-Express etwas dumpf ist und den PGP/MIME Standard nicht kennt. Weise diese geplagten Benutzer darauf hin, dass sie besser ein modernes Mail-Programm benutzen sollten, zum Beispiel Thunderbird.
  11. Um Enigmail immer eine Signatur erstellen zu lassen, aktiviere Sign non-encrypted messages per default im gleichen Dialog, zusätzlich zu Sign encrypted messages by default.
  12. Um automatisch an alle Empfänger zu verschlüsseln, für die du einen öffentlichen Schlüssel hast, aktiviere dort auch Encrypt messages by default.
  13. Für eine Überprüfung der jeweiligen Einstellungen beim Versenden einer mail aktiviere unter OpenPGP → Preferences → Sending die Option Always confirm before sending.
    Hilfe: Enigmail Configuration Manual, Sending.

Zur Schlüsselpaar-Generierung gibt es Hilfe in Enigmail GnuPG Setup Guide, Creating a key pair and its revocation certificate. Die dort beschriebene Benutzung der Kommandozeile ist nicht nötig, das ganze kann auch innerhalb des Enigmail OpenPGP Key Manager UI gemacht werden, aber die Bemerkungen über Schlüssellänge und revocation certificate etc. gelten genauso. Enigmail kommt mit einem Assistenten, der bei der ersten Benutzung des OpenPGP → KeyManager Menüs gestartet wird, und dich durch den Vorgang führt. Für Neugierige gibt es eine Vorschau von screenshots. Du solltest diesen Assistenten ganz durchlaufen, nach einem Abbruch wird er nicht mehr angeboten und ein manueller Neustart erfordert die pref.js Datei zu editieren, siehe weiter unten.

Dank geht an Zoë, ohne ihren Leidensweg hätte ich diese Anleitung nicht erstellt ;-)

How to manually rerun the Enigmail wizard when you closed it using the Cancel button

Snippet taken from a forum posting on mozilla-enigmail.org:

the line

user_pref("extensions.enigmail.configuredVersion", "0.95.3");

in prefs.js is responsible for preventing further runs of the wizard. When that line is removed (with TB closed), the wizard is offered again via the "Key Management" option.

Warning: backup your prefs.js before tinkering with it ..


Home