4 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8" />
5 <title>Email Self-Defense - a guide to fighting surveillance with GnuPG
7 <meta name=
"keywords" content=
"GnuPG, GPG, openpgp, surveillance, privacy,
8 email, security, GnuPG2, encryption" />
9 <meta name=
"description" content=
"Email surveillance violates our fundamental
10 rights and makes free speech risky. This guide will teach you email
11 self-defense in 40 minutes with GnuPG." />
12 <meta name=
"viewport" content=
"width=device-width, initial-scale=1" />
13 <link rel=
"stylesheet" href=
"../static/css/main.css" />
14 <link rel=
"shortcut icon"
15 href=
"../static/img/favicon.ico" />
17 <body><iframe src=
"//static.fsf.org/nosvn/banners/202206fundraiser/" scrolling=
"no" style=
"width: 100%; height: 150px; display: block; margin: 0; border: 0 none; overflow: hidden;"></iframe>
19 <!-- Begin fsf-modal-window-elem campaign element -->
20 <link type=
"text/css" rel=
"stylesheet" href=
"https://static.fsf.org/nosvn/fonts/fa/css/font-awesome.min.css">
22 #fsf-modal-window-elem-container div {
23 -webkit-box-sizing: border-box;
24 -moz-box-sizing: border-box;
25 box-sizing: border-box;
28 @media screen and (min-width:
700px) {
29 #fsf-modal-window-elem-outer-v-center {
36 #fsf-modal-window-elem-inner-v-center {
38 vertical-align: middle;
41 #fsf-modal-window-elem {
47 #fsf-modal-window-elem-right-column {
54 #fsf-modal-window-elem-left-column {
60 #fsf-modal-window-elem-text {
65 @media screen and (max-width:
699px) {
66 #fsf-modal-window-elem {
67 -ms-box-orient: horizontal;
72 display: -webkit-flex;
74 -webkit-flex-flow: row wrap;
78 #fsf-modal-window-elem {
86 #fsf-modal-window-elem-right-column {
91 #fsf-modal-window-elem-left-column {
96 #fsf-modal-window-elem-text {
101 @media screen and (max-width:
360px) {
103 font-size:
25px !important;
107 #fsf-modal-window-elem-container {
115 background-color: rgba(
0,
0,
0,
0.8);
119 #fsf-modal-window-elem a, a:active, a:focus {
124 #fsf-modal-window-elem {
129 border-color: #b25ea8;
131 box-shadow:
0px
0px
10px #
111111;
132 background-color: #e3d9e4;
135 #fsf-modal-window-elem-header {
139 #fsf-modal-window-elem-header h2 {
140 font-family: sans-serif,
"Helvetica",Arial;
144 padding-bottom:
20px;
150 #fsf-modal-window-elem-close-button {
160 #fsf-modal-window-elem-close-button:hover {
164 #fsf-modal-window-elem-right-column {
166 -webkit-user-select: none;
167 -moz-user-select: none;
168 -ms-user-select: none;
172 #fsf-modal-window-elem-buttons div {
174 line-height:
53.333px;
180 #fsf-modal-window-elem-buttons a {
186 text-decoration: none;
187 font-family: sans-serif,
"Helvetica",Arial;
191 #fsf-modal-window-elem-maybe-later {
196 #fsf-modal-window-elem-maybe-later a {
199 text-decoration: none;
202 font-family: sans-serif,
"Helvetica",Arial;
206 #fsf-modal-window-elem-text a {
209 text-decoration: none;
212 #fsf-modal-window-elem-text a:hover {
216 #fsf-modal-window-elem-text a:focus {
220 #fsf-modal-window-elem-text a:active {
224 #fsf-modal-window-elem-text p {
225 font-family: sans-serif,
"Helvetica",Arial;
228 margin:
0px
0px
10px
0px;
233 <div id=
"fsf-modal-window-elem-container" style=
"display: none;">
234 <div id=
"fsf-modal-window-elem-outer-v-center">
235 <div id=
"fsf-modal-window-elem-inner-v-center">
236 <div id=
"fsf-modal-window-elem">
237 <div id=
"fsf-modal-window-elem-header">
238 <div id=
"fsf-modal-window-elem-close-button" onclick=
"//fsfModalWindowElemDontShowForAWhile();">
239 <i class=
"fa fa-close">​</i>
241 <h2>Support #UserFreedom!
</h2>
243 <div id=
"fsf-modal-window-elem-left-column">
244 <div id=
"fsf-modal-window-elem-text">
248 To truly have the right to collaborate, repair, and live more sustainably, we need freedom for computer users. A world with free software would have better privacy, protection from bulk surveillance, and would avoid user lock-in.
254 With your support, we can continue helping people find their reasons and motivation to live more freely. Donate today and help us achieve our spring goal of $
67,
000.
258 <p><span id=
"fsf-modal-window-text-link"><a href=
"https://www.fsf.org/appeal?mtm_campaign=spring22&mtm_source=modal">Read more
</a> |
<a href=
"https://my.fsf.org/donate?mtm_campaign=spring22&mtm_source=modal">Donate
</a></span></p>
262 <div id=
"fsf-modal-window-elem-right-column">
263 <div id=
"fsf-modal-window-elem-buttons" style=
"border-radius: 20px;box-shadow: 5px 0 5px -6px #002047, -5px 0 5px -6px #002047;">
264 <div style=
"background-color:#c87137; border-top-right-radius: 20px; border-top-left-radius: 20px;">
265 <a style=
"text-shadow: 0px 0px 6px #ffe6b4;" href=
"https://my.fsf.org/join?mtm_campaign=spring22&mtm_source=modal" onclick=
"//fsfModalWindowElemFollowedLink();"><i class=
"fa fa-check-circle"> </i>Join
</a>
268 <div style=
"background-color:#e3d9e4;">
269 <a href=
"https://my.fsf.org/renew?mtm_campaign=spring22&mtm_source=modal" onclick=
"//fsfModalWindowElemFollowedLink();"><i class=
"fa fa-refresh"> </i>Renew
</a>
272 <div style=
"background-color:#b25ea8; border-bottom-right-radius: 20px; border-bottom-left-radius: 20px; margin-bottom: 2px">
273 <a style=
"text-shadow: 0px 0px 6px #ffe6b4;" href=
"https://my.fsf.org/donate?mtm_campaign=spring22&mtm_source=modal" onclick=
"//fsfModalWindowElemFollowedLink();"><i class=
"fa fa-money"> </i>Donate
</a>
281 // @license magnet:?xt=urn:btih:
1f739d935676111cfff4b4693e3816e664797050&dn=gpl-
3.0.txt GPL-
3.0
283 // Licensed GPLv3-or-later by Andrew Engelbrecht
285 var startTime, endTime, switchTextTime;
287 startTime = new Date('
2022-
06-
12T04:
00:
00Z');
288 switchTextTime = new Date('
2022-
12-
12T04:
00:
00Z');
289 // endTime is unused.
290 endTime = new Date('
2022-
12-
17T04:
00:
00Z');
292 // Possibly switch the text that is displayed in the modal window, depending
293 // upon the current date.
294 function fsfModalWindowElemMaybeSwitchText () {
299 if (now.getTime() < switchTextTime.getTime()) {
300 return; // Do not switch the text
304 document.getElementById(
"fsf-modal-window-elem-text").innerHTML =' \
306 <p>To truly have the right to collaborate, repair, and live more sustainably, we need freedom for computer users. A world with free software would have better privacy, protection from bulk surveillance, and would avoid user lock-in.<\/p
><p>With your support, we can continue helping people find their reasons and motivation to live more freely. Donate today and help us achieve our spring goal of \$
67,
000!<\/p
> \
308 <p><span id=
"fsf-modal-window-text-link"><a href=
"https://www.fsf.org/appeal?mtm_campaign=spring22&mtm_source=modal">Read more<\/a
> |
<a href=
"https://my.fsf.org/donate?mtm_campaign=spring22&mtm_source=modal">Donate<\/a
><\/span
><\/p
>';
311 // Show fsf-modal-window-elem if it has not been previously closed by
312 // the user, nor recently hit
"maybe later",
313 // and the campaign is still happening
314 function fsfModalWindowElemMaybeShow () {
316 var pattern, noShowFsfModalWindowElementP, now;
318 // See if cookie says not to show element
319 pattern = /showFsf202206FundraiserModalWindowElementP\s*=\s*false/;
320 noShowFsfModalWindowElementP = pattern.test(document.cookie);
322 //// Uncomment here to enable modal window hiding
323 if (!noShowFsfModalWindowElementP) {
324 setTimeout(function () {
325 // display the element
326 document.getElementById(
"fsf-modal-window-elem-container").style.
display=
"block";
331 // Call this first to set the proper text.
332 fsfModalWindowElemMaybeSwitchText();
333 // Check if appeal is the url.
334 if (window.location.href.indexOf(
"appeal") == -
1) {
335 // Call this right away to avoid flicker.
336 fsfModalWindowElemMaybeShow();
339 // Get the time `plusDays` in the future.
340 // This can be a fraction.
341 function daysInFuture (plusDays) {
345 future = new Date(now.getTime() + Math.floor(
1000 *
60 *
60 *
24 * plusDays));
346 return future.toGMTString();
349 // Hide the fsf-modal-window-elem
350 function fsfModalWindowElemHide () {
351 document.getElementById(
"fsf-modal-window-elem-container").style.
display=
"none";
354 // Optionally hide elem and set a cookie to keep the fsf-modal-window-elem hidden for the next `forDays`.
355 function fsfModalWindowElemDontShowForDays (forDays, hideNow) {
356 if (hideNow === true) {
357 fsfModalWindowElemHide();
359 //document.cookie =
"showFsf202206FundraiserModalWindowElementP=false; path=/; domain=.fsf.org; expires=" + daysInFuture(forDays);
360 document.cookie =
"showFsf202206FundraiserModalWindowElementP=false; path=/; SameSite=Strict; Secure; expires=" + daysInFuture(forDays);
363 // Hide the element from now to two weeks after closing it
364 function fsfModalWindowElemDontShowForAWhile () {
365 fsfModalWindowElemDontShowForDays(
7, true);
368 // Keep the element visible for now, but do not show it for a while
369 function fsfModalWindowElemFollowedLink () {
370 fsfModalWindowElemDontShowForDays(
14, false);
373 // Check if visiting appeal page.
374 if (window.location.href.indexOf(
"appeal")
> -
1) {
375 fsfModalWindowElemDontShowForAWhile();
378 // Close popup if user clicks trasparent part
379 document.getElementById(
"fsf-modal-window-elem-container").addEventListener(
"click", function(event){
380 fsfModalWindowElemDontShowForAWhile();
383 // Do not close popup if clicking non-trasparent part (with the text and buttons)
384 document.getElementById(
"fsf-modal-window-elem").addEventListener(
"click", function(event){
385 event.stopPropagation();
388 // Close popup if user clicks X icon
389 document.getElementById(
"fsf-modal-window-elem-close-button").addEventListener(
"click", function(event){
390 fsfModalWindowElemDontShowForAWhile();
393 // Disable popup if user clicks one of the main buttons
394 document.getElementById(
"fsf-modal-window-elem-buttons").addEventListener(
"click", function(event){
395 fsfModalWindowElemFollowedLink();
398 // Disable popup if user clicks one of the
"Read more" link
399 document.getElementById(
"fsf-modal-window-text-link").addEventListener(
"click", function(event){
400 fsfModalWindowElemFollowedLink();
403 // Close popup if user presses escape key
404 window.addEventListener(
"keydown", function (event) {
407 fsfModalWindowElemDontShowForAWhile();
416 <!-- End fsf-modal-window-elem campaign element -->
418 <!--<div style="text-align: center; padding: 2.5px; background-color: #a94442; color:#fcf8e3;"><p>Due to Enigmail's PGP functionality being migrated into Icedove and Thunderbird, steps 2 and 3 of the guide are currently out of date.</p><p> Thank you for your patience while we're working on a new round of updates.</p></div>-->
420 <!-- PLACE FUNDRAISER MODAL WINDOW HERE -->
422 <!-- ~~~~~~~~~ GnuPG Header and introduction text ~~~~~~~~~ -->
423 <header class=
"row" id=
"header"><div>
426 <h1>Email Self-Defense
</h1>
428 <!-- Language list for browsers that do not have JS enabled -->
429 <ul id=
"languages" class=
"os">
430 <li><a class=
"current" href=
"/en">English - v5.0
</a></li>
431 <li><a href=
"/es">español - v5.0
</a></li>
432 <li><a href=
"/fr">français - v5.0
</a></li>
433 <li><a href=
"/tr">Türkçe - v5.0
</a></li>
434 <!--<li><a href="/cs">čeština - v4.0</a></li>
435 <li><a href="/de">Deutsch - v4.0</a></li>
436 <li><a href="/el">ελληνικά - v3.0</a></li>
437 <li><a href="/fa">فارسی - v4.0</a></li>
438 <li><a href="/it">italiano - v3.0</a></li>
439 <li><a href="/ja">日本語 - v4.0</a></li>
440 <li><a href="/pt-br">português do Brasil - v3.0</a></li>
441 <li><a href="/ro">română - v3.0</a></li>-->
442 <li><a href=
"/ru">русский - v5.0
</a></li>
443 <!--<li><a href="/sq">Shqip - v4.0</a></li>
444 <li><a href="/sv">svenska - v4.0</a></li>
445 <li><a href="/zh-hans">简体中文 - v4.0</a></li>-->
446 <li><strong><a href=
"https://libreplanet.org/wiki/GPG_guide/Translation_Guide">
447 Translate!
</a></strong></li>
450 <ul id=
"menu" class=
"os">
451 <li class=
"spacer"><a href=
"index.html" class=
"current">Set up guide
</a></li>
452 <!--<li><a href="mac.html">Mac OS</a></li>-->
453 <!--<li><a href="windows.html">Windows</a></li>-->
454 <li class=
"spacer"><a href=
"workshops.html">Teach your friends
</a></li>
455 <li class=
"spacer"><a href=
"http://4xe3gtgg5vnk5njsvqie53feqddkh3yy37fcnwu7ym5rowem5c37soqd.onion" target=
"_blank">this site's tor onion service
</a></li>
456 <li class=
"spacer"><a
457 href=
"https://fsf.org/share?u=https://u.fsf.org/zb&t=Email%20encryption%20for%20everyone%20via%20%40fsf">
459 <img src=
"../static/img/gnu-social.png" class=
"share-logo"
460 alt=
"[GNU Social]" />
461 <img src=
"../static/img/mastodon.png" class=
"share-logo"
462 alt=
"[Mastodon]" />
463 <img src=
"../static/img/reddit-alien.png" class=
"share-logo"
464 alt=
"[Reddit]" />
465 <img src=
"../static/img/hacker-news.png" class=
"share-logo"
466 alt=
"[Hacker News]" /></a></li>
469 <!-- ~~~~~~~~~ FSF Introduction ~~~~~~~~~ -->
472 <h3><a href=
"https://u.fsf.org/ys"><img
473 alt=
"Free Software Foundation"
474 src=
"../static/img/fsf-logo.png" />
477 <div class=
"fsf-emphasis">
479 <p>We fight for computer users' rights, and promote the development of free (as
480 in freedom) software. Resisting bulk surveillance is very important to us.
</p>
482 <p><strong>Please donate to support Email Self-Defense. We need to keep
483 improving it, and making more materials, for the benefit of people around
484 the world taking the first step towards protecting their privacy.
</strong></p>
488 <div style=
"text-align: center;">
489 <p><a href=
"https://crm.fsf.org/civicrm/contribute/transact?reset=1&id=14&mtm_campaign=email_self_defense&mtm_kwd=guide_donate"><img alt=
"Donate" src=
"../static/img/en/donate.png" /></a></p>
492 <form action=
"https://my.fsf.org/civicrm/profile/create?reset=1&gid=31" method=
"post">
493 <p>Enter your email address to receive our monthly newsletter, the
<br /><a href=
"https://www.fsf.org/free-software-supporter/">Free Software Supporter
</a></p>
495 <p><input id=
"frmEmail" type=
"text" name=
"email-Primary" size=
"18" maxlength=
"80" /></p>
496 <p><input type=
"submit" name=
"_qf_Edit_next" value=
"Subscribe me" /></p>
497 <div><input name=
"postURL" type=
"hidden" value=
"" />
498 <input type=
"hidden" name=
"group[25]" value=
"1" />
499 <input name=
"cancelURL" type=
"hidden" value=
"https://my.fsf.org/civicrm/profile?reset=1&gid=31" />
500 <input name=
"_qf_default" type=
"hidden" value=
"Edit:cancel" />
504 </div><!-- End #fsf-intro -->
506 <!-- ~~~~~~~~~ Guide Introduction ~~~~~~~~~ -->
509 <p><a id=
"infographic" href=
"infographic.html"><img
510 src=
"../static/img/en/infographic-button.png"
511 alt=
"View & share our infographic →" /></a>
512 Bulk surveillance violates our fundamental rights and makes free speech
513 risky. This guide will teach you a basic surveillance self-defense skill: email
514 encryption. Once you've finished, you'll be able to send and receive emails
515 that are scrambled to make sure a surveillance agent or thief intercepting
516 your email can't read them. All you need is a computer with an Internet
517 connection, an email account, and about forty minutes.
</p>
519 <p>Even if you have nothing to hide, using encryption helps protect the privacy
520 of people you communicate with, and makes life difficult for bulk surveillance
521 systems. If you do have something important to hide, you're in good company;
522 these are the same tools that whistleblowers use to protect their identities
523 while shining light on human rights abuses, corruption, and other crimes.
</p>
525 <p>In addition to using encryption, standing up
526 to surveillance requires fighting politically for a
<a
527 href=
"https://gnu.org/philosophy/surveillance-vs-democracy.html">reduction
528 in the amount of data collected on us
</a>, but the essential first step is
529 to protect yourself and make surveillance of your communication as difficult
530 as possible. This guide helps you do that. It is designed for beginners, but
531 if you already know the basics of GnuPG or are an experienced free software
532 user, you'll enjoy the advanced tips and the
<a href=
"workshops.html">guide
533 to teaching your friends
</a>.
</p>
535 </div><!-- End .intro -->
536 </div></header><!-- End #header -->
538 <!-- ~~~~~~~~~ Section 1: Get the pieces ~~~~~~~~~ -->
539 <section class=
"row" id=
"section1"><div>
541 <!-- ~~~~~~~~~ section introduction: interspersed text ~~~~~~~~~ -->
542 <div class=
"section-intro">
544 <h2><em>#
1</em> Get the pieces
</h2>
546 <p class=
"notes">This guide relies on software which is
<a
547 href=
"https://www.gnu.org/philosophy/free-sw.html">freely licensed
</a>;
548 it's completely transparent and anyone can copy it or make their
549 own version. This makes it safer from surveillance than proprietary
550 software (like Windows or macOS). Learn more about free software at
<a
551 href=
"https://u.fsf.org/ys">fsf.org
</a>.
</p>
553 <p>Most GNU/Linux operating systems come with GnuPG installed on them, so if you're running one of these systems, you don't have to download it. If you're running macOS or Windows, steps to download GnuPG are below. Before configuring your encryption setup with this guide, though, you'll need a desktop email program installed on your computer. Many GNU/Linux distributions have one installed already, such as Icedove, which may be under the alternate name
"Thunderbird." Programs like these are another way to access the same email accounts you can access in a browser (like Gmail), but provide extra features.
</p>
555 </div><!-- End .section-intro -->
557 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
558 <div id=
"step-1a" class=
"step">
559 <div class=
"sidebar">
561 <p class=
"large"><img
562 src=
"../static/img/en/screenshots/step1a-install-wizard.png"
563 alt=
"Step 1.A: Install Wizard" /></p>
565 </div><!-- /.sidebar -->
568 <h3><em>Step
1.a
</em> Set up your email program with your email account
</h3>
570 <p>Open your email program and follow the wizard (step-by-step walkthrough)
571 that sets it up with your email account. This usually starts from
"Account Settings" → "Add Mail Account". You should get the email server settings from your systems administrator or the help section of your email account.
</p>
574 <!-- ~~~~~~~~~ Troubleshooting ~~~~~~~~~ -->
575 <div class=
"troubleshooting">
577 <h4>Troubleshooting
</h4>
580 <dt>The wizard doesn't launch
</dt>
581 <dd>You can launch the wizard yourself, but the menu option for doing so is
582 named differently in each email program. The button to launch it will be in
583 the program's main menu, under
"New" or something similar, titled something
584 like
"Add account" or
"New/Existing email account."</dd>
586 <dt>The wizard can't find my account or isn't downloading my mail
</dt>
587 <dd>Before searching the Web, we recommend you start by asking other people
588 who use your email system, to figure out the correct settings.
</dd>
590 <dt>I can't find the menu
</dt>
591 <dd>In many new email programs, the main menu is represented by an image of
592 three stacked horizontal bars.
</dd>
594 <dt class=
"feedback">Don't see a solution to your problem?
</dt>
595 <dd class=
"feedback">Please let us know on the
<a
596 href=
"https://libreplanet.org/wiki/GPG_guide/Public_Review">feedback
600 </div><!-- /.troubleshooting -->
601 </div><!-- End .main -->
602 </div><!-- End #step1-a .step -->
604 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
605 <div id=
"step-1b" class=
"step">
608 <h3><em>Step
1.b
</em> Install GnuPG
</h3>
610 <p>If you are using a GNU/Linux machine, you should already have GnuPG installed, and you can skip to
<a href=
"#section2">Section
2</a>.
</p>
612 <p>If you are using a macOS or Windows machine, however, you need to first install the GnuPG program. Select your operating system below and follow the instructions. For the rest of this guide, the steps are the same for all operating systems.
</p>
614 <!-- ~~~~~~~~~ MACOS ~~~~~~~~~ -->
615 <div class=
"troubleshooting">
620 <dt>Use a third-party package manager to install GnuPG
</dt>
622 <p>The default macOS package manager makes it difficult to install GnuPG and other pieces of free software (like Emacs, GIMP, or Inkscape). To make things easier, we recommend setting up the third-party package manager
"Homebrew" to install GnuPG. For this, we will use a program called
"Terminal," which is pre-installed on macOS.
</p>
624 <p># Copy the first command on the home page of
<a href=
"https://brew.sh/">Homebrew
</a> by clicking on the clipboard icon, and paste it in Terminal. Click
"Enter" and wait for the installation to finalize.
</p>
625 <p># Then install GnuPG by entering the following code in Terminal:
<br/>
626 <code>brew install gnupg gnupg2
</code></p>
630 </div><!-- /.troubleshooting -->
632 <!-- ~~~~~~~~~ WINDOWS ~~~~~~~~~ -->
633 <div class=
"troubleshooting">
638 <dt>Get GnuPG by downloading GPG4Win
</dt>
639 <dd><p><a href=
"https://www.gpg4win.org/">GPG4Win
</a> is an email and file encryption software package that includes GnuPG. Download and install the latest version, choosing default options whenever asked. After it's installed, you can close any windows that it creates.
</p>
643 </div><!-- /.troubleshooting -->
644 </div><!-- End .main -->
645 </div><!-- End #step1-b .step -->
647 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
648 <div id=
"terminology" class=
"step">
651 <h3>GnuPG, OpenPGP, what?
</h3>
653 <p>In general, the terms GnuPG, GPG, GNU Privacy Guard, OpenPGP and PGP
654 are used interchangeably. Technically, OpenPGP (Pretty Good Privacy) is the
655 encryption standard, and GNU Privacy Guard (often shortened to GPG or GnuPG)
656 is the program that implements the standard. Most email programs provide an interface for GnuPG. There is also a newer version of GnuPG, called GnuPG2.
</p>
658 </div><!-- End .main -->
659 </div><!-- End #terminology.step-->
661 </div></section><!-- End #section1 -->
663 <!-- ~~~~~~~~~ Section 2: Make your keys ~~~~~~~~~ -->
664 <section id=
"section2" class=
"row"><div>
666 <!-- ~~~~~~~~~ section introduction: interspersed text ~~~~~~~~~ -->
667 <div class=
"section-intro">
669 <h2><em>#
2</em> Make your keys
</h2>
670 <p class=
"float medium"><img src=
"../static/img/en/screenshots/step2a-01-make-keypair.png" alt=
"A robot with a head shaped like a key holding a private and a public key"/></p>
672 <p>To use the GnuPG system, you'll need a public key and a private key (known
673 together as a keypair). Each is a long string of randomly generated numbers
674 and letters that are unique to you. Your public and private keys are linked
675 together by a special mathematical function.
</p>
677 <p>Your public key isn't like a physical key, because it's stored in the open
678 in an online directory called a keyserver. People download it and use it,
679 along with GnuPG, to encrypt emails they send to you. You can think of the
680 keyserver as a phonebook; people who want to send you encrypted email can
681 look up your public key.
</p>
683 <p>Your private key is more like a physical key, because you keep it to
684 yourself (on your computer). You use GnuPG and your private key together to
685 descramble encrypted emails other people send to you.
<strong>You should never share your private key with anyone, under any
686 circumstances.
</strong></p>
688 <p>In addition to encryption and decryption, you can also use these keys to
689 sign messages and check the authenticity of other people's signatures. We'll
690 discuss this more in the next section.
</p>
692 </div><!-- End .section-intro -->
694 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
695 <div id=
"step-2a" class=
"step">
696 <div class=
"sidebar">
697 <p class=
"large"><img
698 src=
"../static/img/en/screenshots/step2a-02-make-keypair.png"
699 alt=
"Step 2.A: Make your Keypair" /></p>
701 <p class=
"large"><img
702 src=
"../static/img/en/screenshots/step2a-03-make-keypair.png"
703 alt=
"Step 2.A: Set your passphrase" /></p>
705 </div><!-- /.sidebar -->
708 <h3><em>Step
2.a
</em> Make a keypair
</h3>
710 <h4>Make your keypair
</h4>
712 <p>We will use the command line in a terminal to create a keypair using the
715 <p class=
"notes">Whether on GNU/Linux, macOS or Windows, you can launch your
716 terminal (
"Terminal" in macOS,
"PowerShell" in Windows) from the Applications
717 menu (some GNU/Linux systems respond to the
<kbd>Ctrl + Alt + T
</kbd>
720 <p># Enter
<code>gpg --full-generate-key
</code> to start the process.
</p>
721 <p># To answer what kind of key you would like to create, select the default option:
<samp>1 RSA
and
RSA
</samp>.
</p>
722 <p># Enter the following keysize:
<code>4096</code> for a strong key.
</p>
723 <p># Choose the expiration date; we suggest
<code>2y
</code> (
2 years).
</p>
724 <p>Follow the prompts to continue setting up with your personal details.
</p>
725 <p class=
"notes"> Depending on your version of GPG, you may need to use
726 <code>--gen-key
</code> instead of code
>--full-generate-key
</code>.
</p>
728 <h4>Set your passphrase
</h4>
729 <p>On the screen titled
"Passphrase," pick a strong password! You can
730 do it manually, or you can use the Diceware method. Doing it manually
731 is faster but not as secure. Using Diceware takes longer and requires
732 dice, but creates a password that is much harder for attackers to figure
733 out. To use it, read the section
"Make a secure passphrase with Diceware" in
<a
734 href=
"https://theintercept.com/2015/03/26/passphrases-can-memorize-attackers-cant-guess/">
735 this article
</a> by Micah Lee.
</p>
738 <p>If you'd like to pick a passphrase manually, come up with something
739 you can remember which is at least twelve characters long, and includes
740 at least one lower case and upper case letter and at least one number or
741 punctuation symbol. Never pick a password you've used elsewhere. Don't use
742 any recognizable patterns, such as birthdays, telephone numbers, pets' names,
743 song lyrics, quotes from books, and so on.
</p>
745 <!-- ~~~~~~~~~ Troubleshooting ~~~~~~~~~ -->
746 <div class=
"troubleshooting">
748 <h4>Troubleshooting
</h4>
750 <dt>GnuPG is not installed
</dt>
752 You can check if this is the case with the command
<code>gpg --version
</code>.
753 If GnuPG is not installed, it will bring up the following result on most GNU/Linux operating systems, or something like it:
754 <samp>Command 'gpg' not found, but can be installed with:
755 sudo apt install gnupg
</samp>. Follow that command and install the program.
</dd>
757 <dt><i>gpg --full-generate-key
</i> command not working
</dt>
758 <dd>Some distributions use a different version of GPG. When you receive an error code that is something along the lines of:
<samp>gpg: Invalid option
"--full-generate-key"</samp>, you can try the following commands:
<br />
759 <code>sudo apt update
</code><br />
760 <code>sudo apt install gnupg2
</code><br />
761 <code>gpg2 --full-generate-key
</code><br />
762 If this resolved the issue, you need to continue to use the gpg2 identifier instead of gpg throughout the following steps of the guide.
763 <p class=
"notes"> Depending on your version of GPG, you may need to use
764 <code>--gen-key
</code> instead of code
>--full-generate-key
</code>.
</p>
767 <dt>I took too long to create my passphrase
</dt>
768 <dd>That's okay. It's important to think about your passphrase. When you're ready, just follow the steps from the beginning again to create your key.
</dd>
770 <dt>How can I see my key?
</dt>
772 Use the following command to see all keys:
<code>gpg --list-keys
</code>. Yours should be listed in there, and later, so will Edward's (
<a href=
"#section3">Section
3</a>).
<br />
773 If you want to see only your key, you can use
<code>gpg --list-key [your@email]
</code>.
<br />
774 You can also use
<code>gpg --list-secret-key
</code> to see your own private key.
</dd>
776 <dt>More resources
</dt>
777 <dd>For more information about this process, you can also refer to
<a
778 href=
"https://www.gnupg.org/gph/en/manual/c14.html#AEN25">The GNU Privacy
779 Handbook
</a>. Make sure you stick with
"RSA and RSA" (the default),
780 because it's newer and more secure than the algorithms the documentation
781 recommends. Also make sure your key is at least
4096 bits if you
782 want to be secure.
</dd>
784 <dt class=
"feedback">Don't see a solution to your problem?
</dt>
785 <dd class=
"feedback">Please let us know on the
<a
786 href=
"https://libreplanet.org/wiki/GPG_guide/Public_Review">feedback
790 </div><!-- /.troubleshooting -->
792 <!-- ~~~~~~~~~ Troubleshooting ~~~~~~~~~ -->
793 <div class=
"troubleshooting">
797 <dt>Advanced key pairs
</dt>
798 <dd>When GnuPG creates a new keypair, it compartmentalizes
799 the encryption function from the signing function through
<a
800 href=
"https://wiki.debian.org/Subkeys">subkeys
</a>. If you use
801 subkeys carefully, you can keep your GnuPG identity more
802 secure and recover from a compromised key much more quickly.
<a
803 href=
"https://alexcabal.com/creating-the-perfect-gpg-keypair/">Alex Cabal
</a>
804 and
<a href=
"https://keyring.debian.org/creating-key.html">the Debian wiki
</a>
805 provide good guides for setting up a secure subkey configuration.
</dd>
808 </div><!-- /.troubleshooting -->
809 </div><!-- End .main -->
810 </div><!-- End #step-2a .step -->
812 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
813 <div id=
"step-2b" class=
"step">
814 <div class=
"sidebar">
815 <p class=
"large"><img
816 src=
"../static/img/en/screenshots/step2b-04-upload-and-certificate.png"
817 alt=
"Step 2.B: Send to server and generate a certificate" /></p>
819 </div><!-- /.sidebar -->
822 <h3><em>Step
2.b
</em> Some important steps following creation
</h3>
824 <h4>Upload your key to a keyserver
</h4>
825 <p>We will upload your key to a keyserver, so if someone wants to send you an encrypted message, they can download your public key from the Internet. There are multiple keyservers
826 that you can select from the menu when you upload, but they are mostly all copies
827 of each other. Any server will work, but it's good to remember which one you uploaded your key to originally. Also keep in mind, sometimes takes a few hours for them to match each other when a new key is uploaded.
</p>
828 <p># Copy your keyID:
<code>gpg --list-key [your@email]
</code> will list your public (
"pub") key information, including your keyID, which is a unique list of numbers and letters. Copy this keyID, so you can use it in the following command.
</p>
829 <p># Upload your key to a server:
830 <code>gpg --send-key [keyID]
</code></p>
832 <h4>Export your key to a file
</h4>
833 <p>Use the following command to export your secret key so you can import it into your email client at the next
<a href=
"#section3">step
</a>. To avoid getting your key compromised, store this in a safe place, and make sure that if it is transferred, it is done so in a trusted way. Exporting your keys can be done with the following commands:
</p>
835 $ gpg --export-secret-keys -a [keyID]
> my_secret_key.asc
<br/>
836 $ gpg --export -a [keyID]
> my_public_key.asc
839 <h4>Generate a revocation certificate
</h4>
840 <p>Just in case you lose your key, or it gets compromised, you want to generate a certificate and choose to save it in a safe place on your computer for now (please refer to
<a href=
"#step-6c">Step
6.C
</a> for how to best store your revocation cerficate safely). This step is essential for your email self-defense, as you'll learn more about in
<a href=
"#section5">Section
5</a>.
</p>
842 <p># Copy your keyID:
<code>gpg --list-key [your@email]
</code> will list your public (
"pub") key information, including your keyID, which is a unique list of numbers and letters. Copy this keyID, so you can use it in the following command.
</p>
843 <p># Generate a revocation certificate:
<code>gpg --gen-revoke --output revoke.asc [keyID]
</code></p>
844 <p># It will prompt you to give a reason for revocation, we recommend to use
<samp>1 =
key has been compromised
</samp>.
</p>
845 <p># You don't have to fill in a reason, but you can; then press
"Enter" for an empty line, and confirm your selection.
</p>
848 <!-- ~~~~~~~~~ Troubleshooting ~~~~~~~~~ -->
849 <div class=
"troubleshooting">
851 <h4>Troubleshooting
</h4>
854 <dt>Sending my key to the keyserver is not working
</dt>
855 <dd>Instead of using the general command to upload your key to the keyserver, you can use a more specific command and add the keyserver to your command
<code>gpg --keyserver keys.openpgp.org --send-key [keyID]
</code>.
</dd>
857 <dt>My key doesn't seem to be working or I get a
"permission denied."</dt>
858 <dd><p>Like every other file or folder, gpg keys are subject to permissions. If these are not set correctly, your system may not be accepting your keys. You can follow the next steps to check, and update to the right permissions.
</p>
860 <p># Check your permissions:
<code>ls -l ~/.gnupg/*
</code></p>
861 <p># Set permissions to read, write, execute for only yourself, no others. These are the recommended permissions for your folder.
<br/>
862 You can use the code:
<code>chmod
700 ~/.gnupg
</code></p>
863 <p># Set permissions to read and write for yourself only, no others. These are the recommended permissions for the keys inside your folder.
<br/>
864 You can use the code:
<code>chmod
600 ~/.gnupg/*
</code></p>
866 <p class=
"notes">If you have (for any reason) created your own folders inside ~/.gnupg, you must also additionally apply execute permissions to that folder. Folders require execution privileges to be opened. For more information on permissions, you can check out
<a href=
"https://helpdeskgeek.com/linux-tips/understanding-linux-permissions-chmod-usage/">this detailed information guide
</a>.
</p>
869 <dt class=
"feedback">Don't see a solution to your problem?
</dt>
870 <dd class=
"feedback">Please let us know on the
<a
871 href=
"https://libreplanet.org/wiki/GPG_guide/Public_Review">feedback
875 </div><!-- /.troubleshooting -->
877 <!-- ~~~~~~~~~ Troubleshooting ~~~~~~~~~ -->
878 <div class=
"troubleshooting">
883 <dt>More about keyservers
</dt>
884 <dd>You can find some more keyserver information
<a
885 href=
"https://www.gnupg.org/gph/en/manual/x457.html"> in this manual
</a>.
<a
886 href=
"https://sks-keyservers.net/overview-of-pools.php">The sks Web site
</a>
887 maintains a list of highly interconnected keyservers. You can also
<a
888 href=
"https://www.gnupg.org/gph/en/manual/x56.html#AEN64">directly export
889 your key
</a> as a file on your computer.
</dd>
891 <dt>Transferring your keys
</dt>
893 <p>Use the following commands to transfer your keys. To avoid getting your key compromised, store it in a safe place, and make sure that if it is transferred, it is done so in a trusted way. Importing and exporting a key can be done with the following commands:
</p>
896 $ gpg --export-secret-keys -a [keyID]
> my_private_key.asc
<br />
897 $ gpg --export -a [keyID]
> my_public_key.asc
<br />
898 $ gpg --import my_private_key.asc
<br />
899 $ gpg --import my_public_key.asc
902 <p>Ensure that the keyID printed is the correct one, and if so, then go ahead and add ultimate trust for it:
</p>
905 $ gpg --edit-key [your@email]
908 <p>Because this is your key, you should choose
<code>ultimate
</code>. You shouldn't trust anyone else's key ultimately.
</p>
910 <p class=
"notes"> Refer to
<a href=
"#step-2b">Troubleshooting in Step
2.B
</a> for more information on permissions. When transferring keys, your permissions may get mixed, and errors may be prompted. These are easily avoided when your folders and files have the right permissions
</p>
914 </div><!-- /.troubleshooting -->
915 </div><!-- End .main -->
916 </div><!-- End #step-2b .step -->
917 </div></section><!-- End #section2 -->
919 <!-- ~~~~~~~~~ Section 3: Set up email encryption ~~~~~~~~~ -->
920 <section id=
"section3" class=
"row"><div>
922 <!-- ~~~~~~~~~ section introduction: interspersed text ~~~~~~~~~ -->
923 <div class=
"section-intro">
925 <h2><em>#
3</em> Set up email encryption
</h2>
926 <p class=
"notes">The Icedove (or Thunderbird) email program has PGP functionality integrated, which makes it pretty easy to work with. We'll take you through the steps of integrating and using your key in these email clients.
</p>
928 </div><!-- End .section-intro -->
930 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
931 <div id=
"step-3a" class=
"step">
932 <div class=
"sidebar">
934 <p class=
"large"><img src=
"../static/img/en/screenshots/step3a-open-key-manager.png"
935 alt=
"Step 3.A: Email Menu" /></p>
937 <p class=
"large"><img src=
"../static/img/en/screenshots/step3a-import-from-file.png"
938 alt=
"Step 3.A: Import From File" /></p>
940 <p class=
"large"><img src=
"../static/img/en/screenshots/step3a-success.png"
941 alt=
"Step 3.A: Success" /></p>
943 <p class=
"large"><img src=
"../static/img/en/screenshots/step3a-troubleshoot.png"
944 alt=
"Step 3.A: Troubleshoot" /></p>
945 </div><!-- /.sidebar -->
948 <h3><em>Step
3.a
</em> Set up your email with encryption
</h3>
950 <p>Once you have set up your email with encryption, you can start contributing to encrypted traffic on the Internet. First we'll get your email client to import your secret key, and we will also learn how to get other people's public keys from servers so you can send and receive encrypted email.
</p>
952 <p># Open your email client and use
"Tools" → <i>OpenPGP Key Manager
</i></p>
953 <p># Under
"File" → <i>Import Secret Key(s) From File
</i></p>
954 <p># Select the file you saved under the name [my_secret_key.asc] in
<a href=
"#step-2b">Step
2.B
</a> when you exported your key
</p>
955 <p># Unlock with your passphrase
</p>
956 <p># You will receive a
"OpenPGP keys successfully imported" window to confirm success
</p>
957 <p># Go to
"Account settings" → "End-To-End Encryption," and make sure your key is imported and select
<i>Treat this key as a Personal Key
</i>.
</p>
959 </div><!-- End .main -->
961 <!-- ~~~~~~~~~ Troubleshooting ~~~~~~~~~ -->
963 <div class=
"troubleshooting">
964 <h4>Troubleshooting
</h4>
966 <dt>I'm not sure the import worked correctly
</dt>
968 Look for
"Account settings" → "End-To-End Encryption." Here you can see if your personal key associated with this email is found. If it is not, you can try again via the
<i>Add key
</i> option. Make sure you have the correct, active, secret key file.
971 <dt class=
"feedback">Don't see a solution to your problem?
</dt>
972 <dd class=
"feedback">Please let us know on the
<a
973 href=
"https://libreplanet.org/wiki/GPG_guide/Public_Review">feedback
977 </div><!-- /.troubleshooting -->
978 </div><!-- End .main -->
979 </div><!-- End #step3-a .step -->
980 </div></section><!-- End #section3 -->
982 <!-- ~~~~~~~~~ Section 4: Try it out ~~~~~~~~~ -->
983 <section class=
"row" id=
"section4"><div>
985 <!-- ~~~~~~~~~ section introduction: interspersed text ~~~~~~~~~ -->
986 <div class=
"section-intro">
988 <h2><em>#
4</em> Try it out!
</h2>
989 <p class=
"float small"><img src=
"../static/img/en/screenshots/section3-try-it-out.png" alt=
"Illustration of a person in a house with a cat connected to a server"/></p>
990 <p>Now you'll try a test correspondence with an FSF computer program named Edward,
991 who knows how to use encryption. Except where noted, these are the same
992 steps you'd follow when corresponding with a real, live person.
</p>
994 <!-- <p>NOTE: Edward is currently having some technical difficulties, so he
995 may take a long time to respond, or not respond at all. We're sorry about
996 this and we're working hard to fix it. Your key will still work even without
997 testing with Edward.</p> -->
999 <div style=
"clear: both"></div>
1000 </div><!-- End .section-intro -->
1002 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1003 <div id=
"step-4a" class=
"step">
1004 <div class=
"sidebar">
1006 <p class=
"large"><img
1007 src=
"../static/img/en/screenshots/step4a-send-key-to-Edward.png"
1008 alt=
"Step 4.A Send key to Edward." /></p>
1010 </div><!-- /.sidebar -->
1013 <h3><em>Step
4.a
</em> Send Edward your public key
</h3>
1015 <p>This is a special step that you won't have to do when corresponding
1016 with real people. In your email program's menu, go to
"Tools" → "OpenPGP Key
1017 Manager." You should see your key in the list that pops up. Right click
1018 on your key and select
<i>Send Public Keys by Email
</i>. This will create a new draft message, as if you had just hit the
"Write" button, but in the attachment you will find your public keyfile.
</p>
1020 <p>Address the message to
<a
1021 href=
"mailto:edward-en@fsf.org">edward-en@fsf.org
</a>. Put at least one word
1022 (whatever you want) in the subject and body of the email. Don't send yet.
</p>
1024 <p>We want Edward to be able to open the email with your keyfile, so we want this first special message to be unencrypted. Make sure encryption is turned off by using the dropdown menu
"Security" and select
<i>Do Not Encrypt
</i>. Once encryption is off, hit Send.
</p>
1026 <p class=
"notes">It may take two or three minutes for Edward to
1027 respond. In the meantime, you might want to skip ahead and check out the
<a
1028 href=
"#section6">Use it Well
</a> section of this guide. Once you have received a response,
1029 head to the next step. From here on, you'll be doing just the same thing as
1030 when corresponding with a real person.
</p>
1032 <p>When you open Edward's reply, GnuPG may prompt you for your passphrase
1033 before using your private key to decrypt it.
</p>
1035 </div><!-- End .main -->
1036 </div><!-- End #step-4a .step -->
1038 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1039 <div id=
"step-4b" class=
"step">
1040 <div class=
"sidebar">
1042 <p class=
"large"><img
1043 src=
"../static/img/en/screenshots/step4b-option1-verify-key.png"
1044 alt=
"Step 4.B Option 1. Verify key" /></p>
1046 <p class=
"large"><img
1047 src=
"../static/img/en/screenshots/step4b-option2-import-key.png"
1048 alt=
"Step 4.B Option 2. Import key" /></p>
1049 </div><!-- /.sidebar -->
1053 <h3><em>Step
4.b
</em> Send a test encrypted email
</h3>
1055 <h4>Get Edward's key
</h4>
1057 <p>To encrypt an email to Edward, you need its public key, so now you'll have
1058 to download it from a keyserver. You can do this in two different ways:
</p>
1059 <p><strong>Option
1.
</strong> In the email answer you received from Edward as a response to your first email, Edward's public key was included. On the right of the email, just above the writing area, you will find an
"OpenPGP" button that has a lock and a little wheel next to it. Click that, and select
<i>Discover
</i> next to the text:
"This message was signed with a key that you don't yet have." A popup with Edward's key details will follow.
</p>
1061 <p><strong>Option
2.
</strong> Open your OpenPGP Key manager, and under
"Keyserver" choose
<i>Discover Keys Online
</i>. Here, fill in Edward's email address, and import Edward's key.
</p>
1063 <p>The option
<i>Accepted (unverified)
</i> will add this key to your key manager, and now it can be used to send encrypted emails and to verify digital signatures from Edward.
</p>
1065 <p class=
"notes">In the popup window confirming if you want to import Edward's key, you'll see many different emails that are all associated with its key. This is correct; you can safely import the key.
</p>
1067 <p class=
"notes">Since you encrypted this email with Edward's public key,
1068 Edward's private key is required to decrypt it. Edward is the only one with
1069 its private key, so no one except Edward can decrypt it.
</p>
1071 <h4>Send Edward an encrypted email
</h4>
1073 <p> Write a new email in your email program, addressed to
<a
1074 href=
"mailto:edward-en@fsf.org">edward-en@fsf.org
</a>. Make the subject
1075 "Encryption test" or something similar and write something in the body.
</p>
1077 <p>This time, make sure encryption is turned on by using the dropdown menu
"Security" and select
<i>Require Encryption
</i>. Once encryption is on, hit Send.
</p>
1080 <!-- ~~~~~~~~~ Troubleshooting ~~~~~~~~~ -->
1081 <div class=
"troubleshooting">
1083 <h4>Troubleshooting
</h4>
1086 <dt>"Recipients not valid, not trusted or not found"</dt>
1087 <dd>You could get the above error message, or something along these lines:
"Unable to send this message with end-to-end encryption, because there are problems with the keys of the following recipients: ..." In these cases, you may be trying to send an encrypted email to someone when you do not have their public key yet. Make sure you follow the steps above to import the key to your key manager. Open the OpenPGP Key Manager to make sure the recipient is listed there.
</dd>
1089 <dt>Unable to send message
</dt>
1090 <dd>You could get the following message when trying to send your encrypted email:
"Unable to send this message with end-to-end encryption, because there are problems with the keys of the following recipients: edward-en@fsf.org." This usually means you imported the key with the
"unaccepted (unverified) option." Go to the
"key properties" of this key by right clicking on the key in the OpenPGP Key Manager, and select the option
<i>Yes, but I have not verified that this is the correct key
</i> in the
"Acceptance" option at the bottom of this window. Resend the email.
</dd>
1092 <dt>I can't find Edward's key
</dt>
1093 <dd>Close the pop-ups that have appeared since you clicked Send. Make sure
1094 you are connected to the Internet and try again. If that doesn't work, you can download the key manually from
<a href=
"https://keys.openpgp.org/search?q=edward-en%40fsf.org">the keyserver
</a>, and import it by using the
<i>Import Public Key(s) from File
</i> option in the OpenPGP Key Manager.
</dd>
1096 <dt>Unscrambled messages in the Sent folder
</dt>
1097 <dd>Even though you can't decrypt messages encrypted to someone else's key,
1098 your email program will automatically save a copy encrypted to your public key,
1099 which you'll be able to view from the Sent folder like a normal email. This
1100 is normal, and it doesn't mean that your email was not sent encrypted.
</dd>
1102 <dt class=
"feedback">Don't see a solution to your problem?
</dt>
1103 <dd class=
"feedback">Please let us know on the
<a
1104 href=
"https://libreplanet.org/wiki/GPG_guide/Public_Review">feedback
1108 </div><!-- /.troubleshooting -->
1110 <!-- ~~~~~~~~~ Troubleshooting ~~~~~~~~~ -->
1111 <div class=
"troubleshooting">
1116 <dt>Encrypt messages from the command line
</dt>
1117 <dd>You can also encrypt and decrypt messages and files from the
<a
1118 href=
"https://www.gnupg.org/gph/en/manual/x110.html">command line
</a>,
1119 if that's your preference. The option --armor makes the encrypted output
1120 appear in the regular character set.
</dd>
1123 </div><!-- /.troubleshooting -->
1124 </div><!-- End .main -->
1125 </div><!-- End #step-4b .step -->
1127 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1128 <div id=
"step-headers_unencrypted" class=
"step">
1131 <h3><em>Important:
</em> Security tips
</h3>
1133 <p>Even if you encrypt your email, the subject line is not encrypted, so
1134 don't put private information there. The sending and receiving addresses
1135 aren't encrypted either, so a surveillance system can still figure out who
1136 you're communicating with. Also, surveillance agents will know that you're
1137 using GnuPG, even if they can't figure out what you're saying. When you
1138 send attachments, you can choose to encrypt them or not,
1139 independent of the actual email.
</p>
1141 <p>For greater security against potential attacks, you can turn off
1142 HTML. Instead, you can render the message body as plain text. In order
1143 to do this in Icedove or Thunderbird, go to
"View" → "Message Body As" → <i>Plain
1146 </div><!-- End .main -->
1147 </div><!-- End #step-headers_unencrypted .step-->
1149 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1150 <div id=
"step-4c" class=
"step">
1151 <div class=
"sidebar">
1153 <p class=
"large"><img
1154 src=
"../static/img/en/screenshots/step4c-Edward-response.png"
1155 alt=
"Step 4.C Edward's response" /></p>
1157 </div><!-- /.sidebar -->
1161 <h3><em>Step
4.c
</em> Receive a response
</h3>
1163 <p>When Edward receives your email, it will use its private key to decrypt
1164 it, then reply to you.
</p>
1166 <p class=
"notes">It may take two or three minutes for Edward to
1167 respond. In the meantime, you might want to skip ahead and check out the
<a
1168 href=
"#section6">Use it Well
</a> section of this guide.
</p>
1170 <p>Edward will send you an encrypted email back saying your email was received and decrypted. Your email client will automatically decrypt Edward's message.
</p>
1172 <p class=
"notes">The OpenPGP button in the email will show a little green checkmark over the lock symbol to show the message is encrypted, and a little orange warning sign which means that you have accepted the key, but not verified it. When you have not yet accepted the key, you will see a little question mark there. Clicking the prompts in this button will lead you to key properties as well.
</p>
1174 </div><!-- End .main -->
1175 </div><!-- End #step-4c .step -->
1177 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1178 <div id=
"step-4d" class=
"step">
1181 <h3><em>Step
4.d
</em> Send a signed test email
</h3>
1183 <p>GnuPG includes a way for you to sign messages and files, verifying that
1184 they came from you and that they weren't tampered with along the way. These
1185 signatures are stronger than their pen-and-paper cousins -- they're impossible
1186 to forge, because they're impossible to create without your private key
1187 (another reason to keep your private key safe).
</p>
1189 <p>You can sign messages to anyone, so it's a great way to make people
1190 aware that you use GnuPG and that they can communicate with you securely. If
1191 they don't have GnuPG, they will be able to read your message and see your
1192 signature. If they do have GnuPG, they'll also be able to verify that your
1193 signature is authentic.
</p>
1195 <p>To sign an email to Edward, compose any message to the email address and click the
1196 pencil icon next to the lock icon so that it turns gold. If you sign a
1197 message, GnuPG may ask you for your password before it sends the message,
1198 because it needs to unlock your private key for signing.
</p>
1200 <p>In
"Account Settings" → "End-To-End-Encryption" you can opt to
<i>add digital signature by default
</i>.
</p>
1202 </div><!-- End .main -->
1203 </div><!-- End #step-4d .step -->
1205 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1206 <div id=
"step-4e" class=
"step">
1209 <h3><em>Step
4.e
</em> Receive a response
</h3>
1211 <p>When Edward receives your email, he will use your public key (which
1212 you sent him in
<a href=
"#step-3a">Step
3.A
</a>) to verify the message
1213 you sent has not been tampered with and to encrypt a reply to you.
</p>
1215 <p class=
"notes">It may take two or three minutes for Edward to
1216 respond. In the meantime, you might want to skip ahead and check out the
<a
1217 href=
"#section6">Use it Well
</a> section of this guide.
</p>
1219 <p>Edward's reply will arrive encrypted, because he prefers to use encryption
1220 whenever possible. If everything goes according to plan, it should say
1221 "Your signature was verified." If your test signed email was also encrypted,
1222 he will mention that first.
</p>
1224 <p>When you receive Edward's email and open it, your email client will
1225 automatically detect that it is encrypted with your public key, and
1226 then it will use your private key to decrypt it.
</p>
1228 </div><!-- End .main -->
1229 </div><!-- End #step-4e .step -->
1232 <!-- ~~~~~~~~~ Section 5: Learn About the Web of Trust ~~~~~~~~~ -->
1233 <section class=
"row" id=
"section5"><div>
1235 <!-- ~~~~~~~~~ section introduction: interspersed text ~~~~~~~~~ -->
1236 <div class=
"section-intro">
1238 <h2><em>#
5</em> Learn about the Web of Trust
</h2>
1239 <p class=
"float small"><img src=
"../static/img/en/screenshots/section5-web-of-trust.png" alt=
"Illustration of keys all interconnected with a web of lines"/></p>
1241 <p>Email encryption is a powerful technology, but it has a weakness:
1242 it requires a way to verify that a person's public key is actually
1243 theirs. Otherwise, there would be no way to stop an attacker from making
1244 an email address with your friend's name, creating keys to go with it, and
1245 impersonating your friend. That's why the free software programmers that
1246 developed email encryption created keysigning and the Web of Trust.
</p>
1248 <p>When you sign someone's key, you are publicly saying that you've verified
1249 that it belongs to them and not someone else.
</p>
1251 <p>Signing keys and signing messages use the same type of mathematical
1252 operation, but they carry very different implications. It's a good practice
1253 to generally sign your email, but if you casually sign people's keys, you
1254 may accidentally end up vouching for the identity of an imposter.
</p>
1256 <p>People who use your public key can see who has signed it. Once you've
1257 used GnuPG for a long time, your key may have hundreds of signatures. You
1258 can consider a key to be more trustworthy if it has many signatures from
1259 people that you trust. The Web of Trust is a constellation of GnuPG users,
1260 connected to each other by chains of trust expressed through signatures.
</p>
1262 </div><!-- End .section-intro -->
1264 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1265 <div id=
"step-5a" class=
"step">
1266 <div class=
"sidebar">
1268 <p class=
"large"><img
1269 src=
"../static/img/en/screenshots/step5a-key-properties.png"
1270 alt=
"Section 5: trusting a key" /></p>
1272 </div><!-- /.sidebar -->
1275 <h3><em>Step
5.a
</em> Sign a key
</h3>
1277 <p>In your email program's menu, go to OpenPGP Key Manager and select
<i>Key properties
</i> by right clicking on Edward's key.
</p>
1279 <p>Under
"Your Acceptance," you can select
<i>Yes, I've verified in person this key has the correct fingerprint
"</i>.</p>
1281 <p class="notes
">You've just effectively said "I trust that Edward's public
1282 key actually belongs to Edward.
" This doesn't mean much because Edward isn't
1283 a real person, but it's good practice, and for real people it is important. You can read more about signing a person's key in the <a href="#check-ids-before-signing
">check IDs before signing</a> section.</p>
1285 <!--<div id="pgp-pathfinder
">
1287 <form enctype="application/x-www-form-urlencoded
" action="/mk_path.cgi
"
1290 <p><strong>From:</strong><input type="text
" value="xD41A008
"
1293 <p><strong>To:</strong><input type="text
" value="50BD01x4
" name="TO
"></p>
1295 <p class="buttons
"><input type="submit
" value="trust paths
" name="PATHS
"><input
1296 type="reset
" value="reset
" name=".reset
"></p>
1300 </div>End #pgp-pathfinder -->
1301 </div><!-- End .main -->
1302 </div><!-- End #step-5a .step -->
1304 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1305 <div id="step-identify_keys
" class="step
">
1308 <h3>Identifying keys: Fingerprints and IDs</h3>
1310 <p>People's public keys are usually identified by their key fingerprint,
1311 which is a string of digits like F357AA1A5B1FA42CFD9FE52A9FF2194CC09A61E8
1312 (for Edward's key). You can see the fingerprint for your public key, and
1313 other public keys saved on your computer, by going to OpenPGP Key
1314 Management in your email program's menu, then right clicking on the key
1315 and choosing Key Properties. It's good practice to share your fingerprint
1316 wherever you share your email address, so that people can double-check that
1317 they have the correct public key when they download yours from a keyserver.</p>
1319 <p class="notes
">You may also see public keys referred to by a shorter
1320 keyID. This keyID is visible directly from the Key Management
1321 window. These eight character keyIDs were previously used for
1322 identification, which used to be safe, but is no longer reliable. You
1323 need to check the full fingerprint as part of verifying you have the
1324 correct key for the person you are trying to contact. Spoofing, in
1325 which someone intentionally generates a key with a fingerprint whose
1326 final eight characters are the same as another, is unfortunately
1329 </div><!-- End .main -->
1330 </div><!-- End #step-identify_keys .step-->
1332 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1333 <div id="check-ids-before-signing
" class="step
">
1336 <h3><em>Important:</em> What to consider when signing keys</h3>
1338 <p>Before signing a person's key, you need to be confident that it actually
1339 belongs to them, and that they are who they say they are. Ideally, this
1340 confidence comes from having interactions and conversations with them over
1341 time, and witnessing interactions between them and others. Whenever signing
1342 a key, ask to see the full public key fingerprint, and not just the shorter
1343 keyID. If you feel it's important to sign the key of someone you've just
1344 met, also ask them to show you their government identification, and make
1345 sure the name on the ID matches the name on the public key.</p>
1347 <!-- ~~~~~~~~~ Troubleshooting ~~~~~~~~~ -->
1348 <div class="troubleshooting
">
1353 <dt>Master the Web of Trust</dt>
1354 <dd>Unfortunately, trust does not spread between users the way <a
1355 href="https://fennetic.net/irc/finney.org/~hal/web_of_trust.html
">many people
1356 think</a>. One of the best ways to strengthen the GnuPG community is to deeply <a
1357 href="https://www.gnupg.org/gph/en/manual/x334.html
">understand</a> the Web of
1358 Trust and to carefully sign as many people's keys as circumstances permit.</dd>
1361 </div><!-- /.troubleshooting -->
1362 </div><!-- End .main -->
1363 </div><!-- End #check-ids-before-signing .step-->
1364 </div></section><!-- End #section5 -->
1366 <!-- ~~~~~~~~~ Section 6: Use it well ~~~~~~~~~ -->
1367 <section id="section6
" class="row
"><div>
1369 <!-- ~~~~~~~~~ section introduction: interspersed text ~~~~~~~~~ -->
1370 <div class="section-intro
">
1372 <h2><em>#6</em> Use it well</h2>
1374 <p>Everyone uses GnuPG a little differently, but it's important to follow
1375 some basic practices to keep your email secure. Not following them, you
1376 risk the privacy of the people you communicate with, as well as your own,
1377 and damage the Web of Trust.</p>
1379 </div><!-- End .section-intro -->
1381 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1382 <div id="step-
6a
" class="step
">
1383 <div class="sidebar
">
1385 <p class="medium
"><img
1386 src="../static/img/en/screenshots/section6-
01-use-it-well.png
"
1387 alt="Section
6: Use it Well (
1)
" /></p>
1389 </div><!-- /.sidebar -->
1392 <h3>When should I encrypt? When should I sign?</h3>
1394 <p>The more you can encrypt your messages, the better. If you only encrypt
1395 emails occasionally, each encrypted message could raise a red flag for
1396 surveillance systems. If all or most of your email is encrypted, people
1397 doing surveillance won't know where to start. That's not to say that only
1398 encrypting some of your email isn't helpful -- it's a great start and it
1399 makes bulk surveillance more difficult.</p>
1401 <p>Unless you don't want to reveal your own identity (which requires other
1402 protective measures), there's no reason not to sign every message, whether or
1403 not you are encrypting. In addition to allowing those with GnuPG to verify
1404 that the message came from you, signing is a non-intrusive way to remind
1405 everyone that you use GnuPG and show support for secure communication. If you
1406 often send signed messages to people that aren't familiar with GnuPG, it's
1407 nice to also include a link to this guide in your standard email signature
1408 (the text kind, not the cryptographic kind).</p>
1410 </div><!-- End .main -->
1411 </div><!-- End #step-6a .step -->
1413 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1414 <div id="step-
6b
" class="step
">
1415 <div class="sidebar
">
1417 <p class="medium
"><img
1418 src="../static/img/en/screenshots/section6-
02-use-it-well.png
"
1419 alt="Section
6: Use it Well (
2)
" /></p>
1421 </div><!-- /.sidebar -->
1424 <h3>Be wary of invalid keys</h3>
1426 <p>GnuPG makes email safer, but it's still important to watch out for invalid
1427 keys, which might have fallen into the wrong hands. Email encrypted with
1428 invalid keys might be readable by surveillance programs.</p>
1430 <p>In your email program, go back to the first encrypted email that Edward
1431 sent you. Because Edward encrypted it with your public key, it will have a
1432 green checkmark a at the top "OpenPGP
" button.</p>
1434 <p><strong>When using GnuPG, make a habit of glancing at that button. The program
1435 will warn you there if you get an email signed with a key that can't
1436 be trusted.</strong></p>
1438 </div><!-- End .main -->
1439 </div><!-- End #step-6b .step -->
1441 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1442 <div id="step-
6c
" class="step
">
1445 <h3>Copy your revocation certificate to somewhere safe</h3>
1447 <p>Remember when you created your keys and saved the revocation certificate
1448 that GnuPG made? It's time to copy that certificate onto the safest storage that you have -- a flash drive, disk, or hard drive stored in a safe place in your home could work, not on a device you carry with you regularly. The safest way we know is actually to print the revocation certificate and store it in a safe place.</p>
1450 <p>If your private key ever gets lost or stolen, you'll need this certificate
1451 file to let people know that you are no longer using that keypair.</p>
1453 </div><!-- End .main -->
1454 </div><!-- End #step-6c .step -->
1456 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1457 <div id="step-lost_key
" class="step
">
1460 <h3><em>IMPORTANT:</em> ACT SWIFTLY if someone gets your private key</h3>
1462 <p>If you lose your private key or someone else gets a hold
1463 of it (say, by stealing or cracking your computer), it's
1464 important to revoke it immediately before someone else uses
1465 it to read your encrypted email or forge your signature. This
1466 guide doesn't cover how to revoke a key, but you can follow these <a
1467 href="https://www.hackdiary.com/
2004/
01/
18/revoking-a-gpg-key/
">instructions</a>.
1468 After you're done revoking, make a new key and send an email to everyone
1469 with whom you usually use your key to make sure they know, including a copy
1470 of your new key.</p>
1472 </div><!-- End .main -->
1473 </div><!-- End #step-lost_key .step-->
1475 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1476 <div id="webmail-and-GnuPG
" class="step
">
1479 <h3>Webmail and GnuPG</h3>
1481 <p>When you use a web browser to access your email, you're using webmail,
1482 an email program stored on a distant website. Unlike webmail, your desktop
1483 email program runs on your own computer. Although webmail can't decrypt
1484 encrypted email, it will still display it in its encrypted form. If you
1485 primarily use webmail, you'll know to open your email client when you receive
1486 a scrambled email.</p>
1488 </div><!-- End .main -->
1489 </div><!-- End #webmail-and-GnuPG .step-->
1491 <!-- ~~~~~~~~~ a div for each step ~~~~~~~~~ -->
1492 <div id="step-
6d
" class="step
">
1495 <h3>Make your public key part of your online identity</h3>
1497 <p> First add your public key fingerprint to your email signature, then
1498 compose an email to at least five of your friends, telling them you just
1499 set up GnuPG and mentioning your public key fingerprint. Link to this guide
1500 and ask them to join you. Don't forget that there's also an awesome <a
1501 href="infographic.html
">infographic to share.</a></p>
1503 <p class="notes
">Start writing your public key fingerprint anywhere someone
1504 would see your email address: your social media profiles, blog, Website,
1505 or business card. (At the Free Software Foundation, we put ours on our
1506 <a href="https://fsf.org/about/staff
">staff page</a>.) We need to get our
1507 culture to the point that we feel like something is missing when we see an
1508 email address without a public key fingerprint.</p>
1510 </div><!-- End .main-->
1511 </div><!-- End #step-6d .step-->
1512 </div></section><!-- End #section6 -->
1514 <!-- ~~~~~~~~~ Section 7: Next steps ~~~~~~~~~ -->
1515 <section class="row
" id="section7
">
1516 <div id="step-click_here
" class="step
">
1519 <h2><a href="next_steps.html
">Great job! Check out the next steps.</a></h2>
1521 </div><!-- End .main -->
1522 </div><!-- End #step-click_here .step-->
1523 </section><!-- End #section7 -->
1525 <!-- ~~~~~~~~~ FAQ ~~~~~~~~~ -->
1526 <!-- When un-commenting this section go to main.css and search
1527 for /* Guide Sections Background */ then add #faq to the desired color
1528 <section class="row
" id="faq
"><div>
1529 <div class="sidebar
">
1537 <dt>My key expired</dt>
1538 <dd>Answer coming soon.</dd>
1540 <dt>Who can read encrypted messages? Who can read signed ones?</dt>
1541 <dd>Answer coming soon.</dd>
1543 <dt>My email program is opening at times I don't want it to open/is now my
1544 default program and I don't want it to be.</dt>
1545 <dd>Answer coming soon.</dd>
1550 </section> --><!-- End #faq -->
1552 <!-- ~~~~~~~~~ Footer ~~~~~~~~~ -->
1553 <footer class="row
" id="footer
"><div>
1554 <div id="copyright
">
1556 <h4><a href="https://u.fsf.org/ys
"><img
1557 alt="Free Software Foundation
"
1558 src="../static/img/fsf-logo.png
" /></a></h4>
1560 <p>Copyright © 2014-2021 <a
1561 href="https://u.fsf.org/ys
">Free Software Foundation</a>, Inc. <a
1562 href="https://my.fsf.org/donate/privacypolicy.html
">Privacy Policy</a>. Please
1563 support our work by <a href="https://u.fsf.org/yr
">joining us as an associate
1566 <p>The images on this page are under a <a
1567 href="https://creativecommons.org/licenses/by/
4.0/
">Creative Commons
1568 Attribution 4.0 license (or later version)</a>, and the rest of it is under
1569 a <a href="https://creativecommons.org/licenses/by-sa/
4.0">Creative Commons
1570 Attribution-ShareAlike 4.0 license (or later version)</a>. Download the <a
1571 href="https://agpl.fsf.org/emailselfdefense.fsf.org/edward/CURRENT/edward.tar.gz
">
1572 source code of Edward reply bot</a> by Andrew Engelbrecht
1573 <andrew@engelbrecht.io> and Josh Drake <zamnedix@gnu.org>,
1574 available under the GNU Affero General Public License. <a
1575 href="https://www.gnu.org/licenses/license-list.html#OtherLicenses
">Why these
1578 <p>Fonts used in the guide & infographic: <a
1579 href="https://www.google.com/fonts/specimen/Dosis
">Dosis</a> by Pablo
1580 Impallari, <a href="https://www.google.com/fonts/specimen/Signika
">Signika</a>
1581 by Anna Giedryś, <a
1582 href="https://www.google.com/fonts/specimen/Archivo+Narrow
">Archivo
1583 Narrow</a> by Omnibus-Type, <a
1584 href="https://libreplanet.org/wiki/GPG_guide/Graphics_Howto#Pitfalls
">PXL-2000</a>
1585 by Florian Cramer.</p>
1587 <p>Download the <a href="emailselfdefense_source.zip
">source package</a>
1588 for this guide, including fonts, image source files and the text of Edward's
1591 <p>This site uses the Weblabels standard for labeling <a
1592 href="https://www.fsf.org/campaigns/freejs
">free JavaScript</a>. View
1593 the JavaScript <a href="https://weblabels.fsf.org/emailselfdefense.fsf.org/
"
1594 rel="jslicense
">source code and license information</a>.</p>
1596 </div><!-- /#copyright -->
1598 <p class="credits
">Infographic and guide design by <a rel="external
"
1599 href="https://jplusplus.org
"><strong>Journalism++</strong><img
1600 src="static/img/jplusplus.png
"
1601 alt="Journalism++
" /></a></p><!-- /.credits -->
1602 </div></footer><!-- End #footer -->
1605 <script type="text/javascript
"
1606 src="../static/js/jquery-
1.11.0.min.js
"></script>
1607 <script type="text/javascript
"
1608 src="../static/js/scripts.js
"></script>
1610 <script type="text/javascript
">
1611 // @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-2.0-or-later
1612 var _paq = _paq || [];
1613 _paq.push(["trackPageView
"]);
1614 _paq.push(["enableLinkTracking
"]);
1617 var u = (("https:
" == document.location.protocol) ? "https
" : "http
") + "://
"+"piwik.fsf.org//
";
1618 _paq.push(["setTrackerUrl
", u+"piwik.php
"]);
1619 _paq.push(["setSiteId
", "13"]);
1620 var d=document, g=d.createElement("script
"), s=d.getElementsByTagName("script
")[0]; g.type="text/javascript
";
1621 g.defer=true; g.async=true; g.src=u+"piwik.js
"; s.parentNode.insertBefore(g,s);
1625 <!-- End Piwik Code -->
1626 <!-- Piwik Image Tracker -->
1627 <noscript><img src="https://piwik.fsf.org//piwik.php?idsite=
13&rec=
1" style="border:
0" alt="" /></noscript>