GnuPG: Secure Mail for Win, Mac, and * nix

    GnupgGnuPG (GNU Privacy Guard) is an open PGP implementation compatible with OpenPGP ( RFC 2440 ) standards . GnuPG allows you to encrypt, decrypt, sign and verify electronic messages using key pairs (RSA by default). The most common use of GnuPG is in encrypting email and verifying the signature of files uploaded. But it is possible to use it in other protocols: for example, the PSI (Jabber-client) supports GnuPG and allows encrypted conversations in-line.

    Consider the installation and initial configuration of GnuPG for three operating systems: Windows, Mac OS X and Linux.
    It is understood that the reader has sufficient knowledge to execute several commands in the OS console (CMD / Terminal / xterm, respectively).


    Download


    Windows : GPG4Win - a ready-made assembly of GnuPG + GUI + Claws-Mail.
    Mac OS X : Install GPG Suite
    Linux : Depending on your distribution. The keyword is gnupg2.
    Due to the variety of clients under * nix, scheduling the installation for each is useless.
    The list of clients supporting GNUPG is here .

    Installation


    Windows : Standard installation. Do not forget to tick the “Claws Mail”.
    Mac OS X : Installing the GPG Suite.
    Linux : Depending on the distribution and the mail client:) l.

    Key Creation



    Run the terminal (cmd.exe / Terminal / xterm).
    For Windows OS, do cd "Folder_Where_installed_GPG4Win" (C: \ Program Files \ GNU \ GnuPG \ by default)
    For all: run the command gpg2 --gen-key
    you will be asked a few questions.
    Please select what kind of key you want:
       (1) RSA and RSA (default)
       (2) DSA and Elgamal
       (3) DSA (sign only)
       (4) RSA (sign only)

    Choose 1.

    RSA keys may be between 1024 and 4096 bits long.
    What keysize do you want? (2048)

    2048 should be enough. Just hit Enter.

    Please specify how long the key should be valid.
             0 = key does not expire
            = key expires in n days
          w = key expires in n weeks
          m = key expires in n months
          y = key expires in n years

    After what time will the key be considered invalid? Press "Enter" :) Let it be eternal.

    Next, click "Y". And we answer 3 questions.

    Real Name: - enter your name in Latin letters (e.g. Vasily Pupkin).
    Email: - enter e-mail (eg v.pupkin@gmail.com)
    Comment: - anything from the name of the company to the nickname)
    If everything is correct, click "O".
    Now we will be asked the password for the key. We enter the same thing 2 times (or press Enter 2 times for a key without a password).
    A few seconds ... And the key is ready! Hurrah! ) We
    check: gpg2 --list-keys
    pub 2048R / 5C35B909 2010-01-31
    uid Vasily Pupkin
    sub 2048R / 40ADD978 2010-01-31


    Using



    Windows: Launch Claws-Mail. We connect the mail account (the one for which the key was created!).
    We go to the settings-modules, check that there is a GPG module there.
    Now, create your own message and select Options-> Encrypt.
    By the way, we can immediately create new keys for another account - Settings-Account Settings-Module-GPG-Generate a new key pair of
    Mac OS X: Start Mail, create a new message, see the “Signed” and “Encryped” checkboxes. We can choose a key for signing / encryption. For 10.6 and Claws-mail, it is similar to Windows.
    Linux: Depending on the client. For Claws-Mail is similar to Windows.

    Correspondence



    For correspondence with a subscriber, you must have his public key. You can get your key with the command gpg2 -a --export your e-mail .
    Import alien - gpg2 --import key file

    The final



    That's all.
    Good luck with encryption) If you want to check, write to me (do not forget to attach your public key with an attachment).
    My key is here .
    Good luck

    UPD@23.01.2014: Updated links

    Also popular now: