GnuPG Privacy Guard Instructions

These instructions tell you how to install and configure the high-security free and open source encryption/decryption software called gnupg. The latest Windows binary may be obtained from ftp://ftp.gnupg.org/gcrypt/binary .

These instructions are for Windows users. If you use another operating system please contact us.

Steps 1-7 need only be done one time as long as you do not change computers or your E-mail address. If you need to receive encrypted reports on more than one computer please contact me to find out how to copy your keys to the other computers. Only one set of keys should be used.
  1. Use WinZip to extract the gnupg.zip file to C:\ after making sure that the Use Folder Names box is checked in the WinZip extract dialog. This will automatically create a directory named C:\gnupg and store the files there. You probably already have WinZip installed; if not click http://www.winzip.com to download the free version.
  2. Use Windows Explorer or My Computer to get to the C:\gnupg folder created by =WinZip=
  3. Double-click on the makekey BAT file to run the gpg EXE program to make your private and public encryption keys. gpg will ask you a few questions. Answer them this way:
    • For the first question click Enter to select the default key type (1)
    • For the keysize click Enter to use the default (1024)
    • Click Enter to select the default expiration (key does not expire); confirm by typing y followed by Enter
    • For your "Real name" enter your first name, a space, and your last name
    • For your E-mail address enter it exactly as the address you want me to use when sending you encrypted information
    • For the "Comment" just type Enter (no comment is needed)
    • Review the information carefully before selecting o for OK
  4. The gpg program may take several seconds to run. If it appears to stall, move the mouse around and click the Shift and Alt keys a few times. gpg is collecting random data to generate your keys, and it can collect such data faster on occasion by providing data input to the system. If the program runs quickly, ignore this.
  5. After the program has finished running, double click on the xportkey BAT file to create a file called mykeys.xpr in =C:\gnupg=
  6. E-mail C:\gnupg\mykeys.xpr as an attachment to us to provide your public key so that we can encrypt files that only you can decipher.
  7. To be able to easily decrypt and read encrypted Adobe Acrobat .pdf files we will send you, you need to use Windows Explorer to associate files with a suffix of .gpg with the C:\gnupg\gpgdcy BAT file application. To use Windows Explorer to do this, do the following:
    1. Select Tools from the menu after Windows  Explorer is open
    2. Select Folder Options
    3. Select the File Types tab
    4. Click on the new button then type gpg in the file extension box and press OK
    5. Under the Details Open With section, select Change
    6. Browse to C:\gnupg\gpgdcy.bat and press Open
    7. Click OK to leave the folder options dialog
Now .gpg files will decrypt and open when double-clicked on or when opening in an E-mail attachment.
Once you have completed steps 1-7 on your computer you will be able to use for example Outlook Express or other E-mail clients to click on encrypted attachments we send you and have these opened automatically using Adobe Acrobat Reader (which we assume you have installed). This process will store the decrypted .pdf file in C:\WINDOWS\TEMP\z.pdf which you may want to delete when finished. If instead you store the encrypted attachment (which will be a .pdf.gpg file) in a permanent place you can open it from Explorer or My Computer with a double click. This will still create C:\WINDOWS\TEMP\z.pdf.
Script used to create the .zip file:
wget -O /tmp/z.zip \
http://ftp.gnupg.org/gcrypt/binary/gnupg-w32cli-1.2.4.zip
cd /tmp
mkdir gpg
cd gpg
unzip ../z
echo "gpg --export > mykeys.xpr" > xportkey.bat
echo "gpg --gen-key" > makekey.bat
echo -e "gpg -o C:\WINDOWS\TEMP\z.pdf %1\nstart C:\WINDOWS\TEMP\z.pdf" > gpgdcy.bat
todos *.bat
rm -f /tmp/gnupg.zip
cd /tmp
zip gnupg.zip gpg/*.bat gpg/gpg.exe
Topic revision: r1 - 11 Jul 2004, FrankHarrell
 

This site is powered by FoswikiCopyright © 2013-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki? Send feedback