How to Encrypt a File With GPG

How to Encrypt a File With GPG thumbnail
Encrypt your files using GPG.

The GNU Privacy Guard (GPG) is an open source method for encrypting files. The GPG program executes in the Windows command line and encrypts a file. If the file is hacked or stolen from a user's computer, the encryption scheme protects it from being read unless the thief has the password. This is beneficial for users who have private files on a computer and want to protect them from open access.

Instructions

    • 1

      Click the Windows "Start" button and enter "cmd" into the text box in the main menu. Press the "Enter" key to start the Windows command line.

    • 2

      Enter "gpg /?" to see a list of encryption options. This allows you to mix and match encryption options for your file.

    • 3

      Enter the following code into the command line to generate your password key:

      gpg --gen-key

      Replace "key" with your personalized password. This is the key used to decrypt the file when you need to view its content.

    • 4

      Enter the following code into the command line to do a basic encryption on your file:

      gpg --encrypt --recipient 'Your Name' myfile.txt

      The "Your Name" field denotes that the file is a personal file for only your use, so only you can decrypt it. You can encrypt any type of file with GPG, so replace "myfile.txt" with the name of the file you want to encrypt. The file created is the same name of the file with the added ".gpg" extension.

    • 5

      Type the following text to decrypt your file:

      gpg --output myfile.txt --decrypt myfile.txt.gpg

      Before the file decrypts, a prompt displays asking for your password phrase. Enter your password phrase to encrypt the file and press "Enter."

Related Searches:

References

  • Photo Credit padlocks image by Christopher Hall from Fotolia.com

Comments

You May Also Like

Related Ads

Featured