Friday, March 24, 2006

How to Encrypt/Decrypt files with a password in Linux

We can use gpg which is a encrypt/decrypt and signing tool for linux, unix,solaris etc.
To encrypt single file use command gpg as follows:
gpg -c filename
Enter password and confirm
-c : Encrypt with symmetric cipher.
To decrypt file use gpg command:
$ gpg
Remember if file extension is .asc then it is ASCII encrypted file and if file extension is .gpg then it is binary encrypted file.
As this uses very powerful encryption algorithm never forget password.

No comments: