#1 Get the pieces

This guide relies on software which is freely licensed; it's completely transparent and anyone can copy it or make their own version. This makes it safer from surveillance than proprietary software (like Windows). To defend your freedom as well as protect yourself from surveillance, we recommend you switch to a free software operating system like GNU/Linux. Learn more about free software at fsf.org.

To get started, you'll need a desktop email program installed on your computer. This guide works with free software versions of the Thunderbird email program, and with Thunderbird itself. Email programs are another way to access the same email accounts you can access in a browser (like GMail), but provide extra features.

If you are already have one of these, you can skip to Step 1.b.

Step 1.a Set your email program up with your email account (if it isn't already)

Open your email program and follow the wizard that sets it up with your email account.

Troubleshooting

What's a wizard?
A wizard is a series of windows that pop up to make it easy to get something done on a computer, like installing a program. You click through it, selecting options as you go.
My email program can't find my account or isn't downloading my mail
Before searching the Web, we recommend you start by asking other people who use your email system, to figure out the correct settings.

Step 1.b Get GnuPG by downloading GPG4Win

GPG4Win is a software package that includes GnuPG. Download and install it, choosing default options whenever asked. After it's installed, you can close any windows that it creates.

Step 1.c Install the Enigmail plugin for your email program

In your email program's menu, select Add-ons (it may be in the Tools section). Make sure Extensions is selected on the left. Do you see Enigmail? if so, skip this step.

If not, search "Enigmail" with the search bar in the upper right. You can take it from here. Restart your email program when you're done.

Troubleshooting

I can't find the menu.
In many new email programs, the main menu is represented by an image of three stacked horizontal bars.

#2 Make your keys

To use the GnuPG system, you'll need a public key and a private key (known together as a keypair). Each is a long string of randomly generated numbers and letters that are unique to you. Your public and private keys are linked together by a special mathematical function.

Your public key isn't like a physical key, because it's stored in the open in an online directory called a keyserver. People download it and use it, along with GnuPG, to encrypt emails they send to you. You can think of the keyserver as phonebook, where people who want to send you an encrypted email look up your public key.

Your private key is more like a physical key, because you keep it to yourself (on your computer). You use GnuPG and your private key to decode encrypted emails other people send to you.

Step 2.a Make a keypair

In your email program's menu, select OpenPGP → Setup Wizard. You don't need to read the text in the window that pops up unless you'd like to, but it's good to read the text on the later screens of the wizard.

On the second screen, titled "Signing," select "No, I want to create per-recipient rules for emails that need to be signed."

Use the default options until you reach the screen titled "Create Key".

On the screen titled "Create Key," pick a strong password! Your password should be at least 12 characters and include at least one lower case and upper case letter and at least one number or punctuation symbol. Don't forget the password, or all this work will be wasted!

The program will take a little while to finish the next step, the "Key Creation" screen. While you wait, do something else with your computer, like watching a movie or browsing the Web. The more you use the computer at this point, the faster the key creation will go.

When the OpenPGP Confirm screen pops up, select Generate Certificate and choose to save it in a safe place on your computer (we recommend making a folder called "Revocation Certificate" in your home folder and keeping it there. You'll learn more about the revocation certificate in Section 5. The setup wizard will ask you to move it onto an external device, but that isn't necessary at this moment.

Troubleshooting

I can't find the OpenPGP menu.
In many new email programs, the main menu is represented by an image of three stacked horizontal bars. OpenPGP may be inside a section called Tools.

Step 2.b Upload your public key to a keyserver

In your email program's menu, select OpenPGP → Key Management.

Right click on your key and select Upload Public Keys to Keyserver. Use the default keyserver in the popup.

Now someone who wants to send you an encrypted message can download your public key from the Internet. There are multiple keyservers that you can select from the menu when you upload, but they are all copies of each other, so it doesn't matter which one you use. However, it sometimes takes a few hours for them to match each other when a new key is uploaded.

Troubleshooting

The progress bar never finishes
Close the upload popup, make sure you are on the Internet and try again. If that doesn't work, try again, selecting a different keyserver.
My key doesnt appear in the list
Try checking Show Default Keys.

GnuPG, OpenPGP, what?

You're using a program called GnuPG, but the menu in your email program is called OpenPGP. Confusing, right? In general, the terms GnuPG, GPG, GNU Privacy Guard, OpenPGP and PGP are used interchangeably, though they all have slightly different meanings.

#3 Try it out!

Now you'll try a test correspondence with a computer program named Adele, which knows how to use encryption. Except where noted, these are the same steps you'd follow when corresponding with a real, live person.

Step 3.a Send Adele your public key

This is a special step that you won't have to do when corresponding with real people. In your email program's menu, go to OpenPGP → Key Management. You should see your key in the list that pops up. Right click on your key and select Send Public Keys by Email. This will create a new draft message, as if you had just hit the Write button.

Address the message to adele-en@gnupp.de. Put at least one word (whatever you want) in the subject and body of the email, then hit send.

It may take two or three minutes for Adele to respond. In the meantime, you might want to skip ahead and check out the Use it Well section of this guide. Once she's responded, head to the next step. From here on, you'll be doing just the same thing as when corresponding with a real person.

Step 3.b Send a test encrypted email

Write a new email in your email program, addressed to adele-en@gnupp.de. Make the subject "Encryption test" or something similar and write something in the body. Don't send it yet.

Click the icon of the key in the bottom right of the composition window (it should turn yellow). This tells Enigmail to encrypt the email with the key you downloaded in the last step.

Next to the key, you'll notice an icon of a pencil. Clicking this tells Enigmail to add a special, uniqe signature to your message, generated using your private key. This is a separate feature from encryption, and you don't have to use it for this guide.

Click Send. Enigmail will pop up a window that says "Recipients not valid, not trusted or not found."

To encrypt and email to Adele, you need her public key, and so now you'll have Enigmail download it from a keyserver. Click Download Missing Keys and use the default in the pop-up that asks you to choose a keyserver. Once it finds keys, check the first one (Key ID starting with 9), then select ok. Select ok in the next pop-up.

Now you are back at the "Recipients not valid, not trusted or not found" screen. Select Adele's key from the list and click Ok. If the message doesn't send automatically, you can hit send now.

Troubleshooting

Enigmail can't find Adele's key
Close the pop-ups that have appeared since you clicked. Make sure you are connected to the Internet and try again. If that doesn't work, repeat the process, choosing a different keyserver when it asks you to pick one.

Important: Security tips

Even if you encrypted your email, the subject line is not encrypted, so don't put private information there. The sending and receiving addresses aren't encrypted either, so they could be read by a surveillance system. When you send attachments, Enigmail will give you an option of whether you want to encrypt them.

It's also good practice to click the key icon in your email composition window before you start to write. Otherwise, your email client could save an unencrypted draft on the mail server, potentially exposing it to snooping.

Step 3.c Receive a response

When Adele receives your email, she will use her private key to decrypt it, then fetch your public key from a keyserver and use it to encrypt a response to you.

Since you encrypted this email with Adele's public key, Adele's private key is required to decrypt it. Adele is the only one with her private key, so no one except her — not even you — can decrypt it.

It may take two or three minutes for Adele to respond. In the meantime, you might want to skip ahead and check out the Use it Well section of this guide.

When you receive Adele's email and open it, Enigmail will automatically detect that it is encrypted with your public key, and then it will use your private key to decrypt it.

Notice the bar that Enigmail shows you above the message, with information about the status of Adele's key.

#4 Aprenda a Rede de Confiabilidade

A criptografia por e-mail é uma tecnologia poderosa, mas tem uma fraqueza; ela requer uma maneira de verificar que a chave pública de uma pessoa é dela mesmo. Senão, não há nada que impeça um adversário de criar um endereço de e-mail com o nome de uma pessoa, criando chaves pra esse endereço e fazendo-se passar por ela. É por isso que os programadores de software livre que desenvolveram a criptografia por e-mail criaram a assinatura de chave e a Rede de Confiabilidade.

Quando você assina a chave de alguém, está dizendo publicamente que confia que a chave pertence mesmo a essa pessoa e não a um impostor. Pessoas que usam sua chave pública podem ver o número de assinaturas que ela tem. Quando já tiver usado o GnuPG por algum tempo, sua chave pode ter centenas de assinaturas. A Rede de Confiabilidade é uma constelação de todas as pessoas que usam o GnuPG, conectadas umas às outras por correntes de confiança expressadas através de assinaturas, formando uma rede gigante. Quanto mais assinaturas uma chave tiver, e quanto mais assinaturas essas pessoas que assinaram tiverem, mais confiável é essa chave.

As chaves públicas das pessoas geralmente são identificadas pela impressão digital de sua chave, que é uma série de dígitos como DD878C06E8C2BEDDD4A440D3E573346992AB3FF7 para a chave de Adele). Você pode ver a imprsesão digital de sua chave pública, e de outras chaves públicas salvas no seu computador, indo em

Você também pode ver chaves públicas serem citadas por seus ID's, que são simplesmente os últimos 8 dígitos da imprsesão digital, como 92AB3FF7 para a Adele. O ID da chave é visível diretamente da Janela @@Key Management@@. O ID da chave é como o primeiro nome de uma pessoa (é uma abreviação útil mas pode mãn ser única para uma determinada chave), enquanto a impressão digital realmente identifica a chave unicamente sem a possibilidade de confusão. Se você só tem o ID da chave, você ainda pode encontrar a chave (assim como a impressão digital), como fez no Passo 3, mas se múltiplas opções aparecerem, você vai precisar da impressão digital da pessoa com quem está tentando se comunicar pra ver qual delas usar.

Passo 4.a Assine uma chave

No menu do seu programa de e-mail, vá para @@OpenPGP → Key Management@@.

Dê dois cliques na chave pública de Adele e selecione @@Select Key@@ do menu de contexto.

Na janela que aparece, selecione "@@I will not answer@@" e clique em OK.

No menu do seu programa de e-mail, vá para @@OpenPGP → Key Management → Keyserver → Upload Public Keys@@ e clique em OK.

Você efetivamente disse "Eu confio que a chave pública de Adele pertence mesmo a Adele." Isso não significa muito porque Adele não é uma pessoa de verdade, mas é uma boa prática.

Importante: cheque a identidade das pessoas antes de assinar as chaves delas

Antes de assinar a chave de uma pessoa de verdade, sempre tenha certeza de que ela pertence mesmo a quem diz, e que elas são quem dizem ser. Peça a elas pra mostrar seus ID's (a não ser que confie muito nelas) e a impressão digital de suas chaves públicas -- não somente o ID da chave pública mais curto, que pode se referir a mais de uma chave. No Enigmail, responda honestamente a janela que aparece e pergunta "@@How carefully have you verified that the key you are about to sign actually belongs to the person(s) named above?@@.

#5 Use bem

Cada pessoa usa o GnuPG de um jeito um pouquinho diferente, mas é importante seguir algumas práticas básicas pra manter seu e-mail seguro. Se você não as seguir, estará ponto em risco a privacidade das pessoas com as quais se comunica, assim como a sua própria, e danificando a Rede de Confiabilidade.

Quando devo codificar?

Quanto mais você puder codificar suas mensagens, melhor. Isso porque se você só codificar e-mails ocasionalmente, cada mensagem codificada pode despertar suspeitas em sistemas de vigilância. Se todos os quase todos os seus e-mails são codificados, as pessoas que conduzem a vigilância não saberão por onde começar.

Não queremos dizer que codificar só uma parte do seus e-mails não ajuda -- é um ótimo começo e torna a vigilância em massa mais difícil.

Importante: Cuidado com chaves inválidas

O GnuPG torna o e-mail mais seguro, mas ainda é importante estar atento para chaves inválidas, que podem ter caído em mãos erradas. E-mails codificados com chaves inválidas podem ser lidos por programas de vigilância.

Em seu programa de e-mail, volte à segunda mensagem que Adele mandou. Como Adele o codificou com a sua chave pública, vai haver uma mensagem do OpenPGP no topo, que provavelmente diz "@@OpenPGP: Part of this message encrypted.@@"

Quando usar o GnuPG, torne prestar atenção nessa barra um hábito. O programa vai te alertar por ali se você receber um e-mail codificado com uma chave na qual não se pode confiar.

Copie seu certificado de revogação para algum lugar seguro

Lembra quando você criou suas chaves e salvou o certificado de revogação que o GnuPG fez? É hora de copiar esse certificado para o armazenamento digital mais seguro que você tiver -- o ideal é um pendrive, CD ou HD guardados em um local seguro na sua casa.

Se um dia você perder sua chave privada, ou se a roubarem, você vai precisar desse arquivo de certificado.

Importante: aja rápido se alguém pegar sua chave privada

Se você perder sua chave privada ou se alguém tomar posse dela (por exemplo, roubando ou invadindo seu computador), é importante revogá-la imediatamente antes que alguém a use para ler suas mensagens encriptadas. Esse guia não cobre os passos pra revogar uma chave, mas você pode seguir as instruções no site do GnuPG. Depois que tiver , mande um e-mail pra todas as pessoas com as quais você costuma usar sua chave pra ter certeza de que elas saberão disso.