These are the different ways you can encrypt file in linux, we will use openssl and gnupg’s file encryption and decryption process.
Symmetric encryption
as the name says symmetric encryption uses the same pair of key to encrypt and decrypt a file which is OK if you are not bothered too much about the security of the location of pass-phrase.
from the command prompt type
1
| openssl des3 -salt -in file -pass file:pass -out file.encrypt |
were file:pass is the location of the passphrase file or you can remove this option and enter the passphrase manually.
to decrypt the encrypted file, use
1
| openssl des3 -d -salt -in file.encrypt -out file |
if you have the gnupg program installed, you can encrypt the file using:
Continue Reading…