Friday, August 01, 2008

Getting Started with GnuPG

Update: Skip this guide, and just download Gpg4win and read the manual that comes with it.

This is a step-by-step guide to get going with GnuPG, on M$ Windows XP (with Service Pack 2).

GnuPG is the GNU project's tool that allows us to encrypt data and therefore have a secure communication.

GnuPG is Free Software (meaning that it respects your freedom). It can be freely used, modified and distributed under the terms of the GNU General Public License.

While it's well known that I discourage everyone from using such an operating system that pose restrictions on the users right and left, like Micro$oft Windows.. I have written this guide only for the goal of helping my fellow human beings use our free as-in-free-speech software.

And since I have no Windows machine nor can access one, I had to depend on the help of a friend and his computer.

  1. First I instructed my friend to download GnuPG from http://gnupg.org/download/index.en.html (direct ftp link: ftp://ftp.gnupg.org/gcrypt/binary/gnupg-w32cli-1.4.9.exe).
  2. Then to double-click on gnupg-w32cli-1.4.9.exe file
  3. Then to choose English for the language
  4. Then to click OK
  5. Then to click on Next
  6. Then to read the license of the software, and to click on Next if he agrees with it.
  7. Everything was selected so he clicked on Next.
  8. Then selected en for English language again and clicked Next.
  9. Then he chose "C:\Program Files\GNU\GnuPG" for the destination directory and clicked Next.
  10. Then clicked on Install.
  11. And when completed he clicked on Next and finally clicked on Finish.
  12. GnuPG is now installed and ready to use.
  13. Start -> All Programs -> Accessories -> Command Prompt
  14. Here I've instructed my friend to type:
    cd
    (and to always press Enter key of course after every command like this).
  15. This will tell us what directory he's at. In his case it is "C:\Documets and Settings\user".
  16. He now changed directory to the desktop directory by typing exactly:
    cd "C:\Documets and Settings\user\Desktop"

  17. Then I asked him to exactly type:
    "C:\Program Files\GNU\GnuPG\gpg.exe" --gen-key

  18. And to enter 1 when asked to select an option, which was the default choice.
  19. Then to enter 2048, which is the default.
  20. Then chose an expiration period. He decided to keep the keys forever so chose 0.
  21. Of course he entered his name and e-mail address, as well as a passphrase and repeated the passphrase for confirmation.
  22. Now for the key I told him to type exactly:
    "C:\Program Files\GNU\GnuPG\gpg.exe" --export --armor > pubkey.asc

    All that in one line of course.
  23. This finally gave him a file on the Desktop called pubkey.asc
  24. To check if everything went well, he used Notepad to open the file by typing:
    notepad pubkey.asc

    And there he saw the gibberish stuff. Look at my public key to know how it would look like.

At this point you have finished both setting up GnuPG and got yourself a pair of keys. A private key, and a public key.

The gibberish stuff inside the pubkey.asc file is your public key, and please feel free to share it with everyone. Send it to them in messages or e-mails or add it to the end of your e-mail letters.. etc...

A follow up post on How to Use GnuPG in our daily life will be posted here soon.

No comments: