Notice! This document is currently in Archived status.
The content of this document may be incorrect or outdated.

Print this article Edit this article

PGP: Encrypting a file with conventional cryptography

To encrypt a file:

To encrypt a file with just conventional cryptography using pgp, type pgp -c textfile. Pgp will prompt you to enter a Pass Phrase this is the key to decrypting the file, don't forget it and keep it secret.
This type of encryption shouldn't be used for email files.

EXAMPLE: If I wanted to encrypt a file containing my bank account numbers.

  • % pgp -c money
    This will create a file called money.pgp which is the encrypted version. Note that the original copy of money still exists so be sure to remove it

 

To decrypt the above encrypted file:

To decrypt an encrypted file, type: pgp ciphertextfile -o plaintext file. Ciphertextfile is the name of the file that is encrypted and plaintext file will be the name of the decrypted file once pgp is finished decrypting.

EXAMPLE: If I wanted to decrypt the above encrypted file: money.pgp.

  • % pgp money.pgp -o new.money
    This will decrypt the file money.pgp and place its contents into new.money. Note that money.pgp will still exist.

Resources used for this FAQ:

PGP man pages Zimmermann, Philip R. The Official PGP User's Guide MIT Press. 1995. ISBN 0-262-74017-6.

Last Modified: Dec 19, 2016 11:12 am US/Eastern
Created: Nov 6, 2007 1:43 pm US/Eastern by admin
JumpURL: