To the Reader

Did you pick this book up just to figure out how to encrypt a file or validate a download? Then this page is for you; if not, it’s my promise to provide useful information on the first page and every page after that. These tips are for users with Gnu Privacy Guard (GnuPG) already installed--which includes all major Linux distributions1. GnuPG works at the command line, so OS X and Linux users open a terminal window, Windows users open the command line window.

To encrypt a file (example.doc) with a secret passphrase, use this command:

image2

You’ll be prompted for a passphrase, twice (to confirm it) and then a file will be written called example.doc.gpg (WARNING: the original file is still there, in plaintext!). The encrypted file can be decrypted back (as example.doc) with this command (plus the passphrase, when prompted3):

image

The recipient will be prompted to enter the passphrase to decrypt the file.

To verify a digitally signed file, such as when downloading a piece of software from the Internet, given the download file named example.doc and a signature file named example.doc.sig both in the current directory, use this command:

image

If the file verifies, the resulting message will include the words “Good signature,” among much more information (which may include a warning that the signing key is not certified--don’t worry about this, for now). If not, “Good signature” will not appear (other information will be displayed, depending on what happened).

Good luck--and if you want to know more about how this works, keep reading!


1For Windows, install Gpg4win (gpg4win.org). For Mac OS X, install GPGTools (gpgtools.org). See the Gnu Privacy Guard site (gnupg.org) for other options.

2The monospace font and the $ character indicate this is an example of a command being entered at the command line. The $ indicates the system is ready to accept a command; the command is typed in and after you type it you press the Enter key to make something happen.

3If you decrypt right after encrypting it, you may not be prompted for a passphrase, as your computer “remembers” it; see section “Pinentry Dialog Box and RAM Caching” of Chapter 4, for more about this issue.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset