Using zip for encryption/decryption
Linux has a whole lot of tools to make your life simpler and safer.
You want to encrypt a confidential file and carry it with you safely. You want to be able to
decrypt it on all machines, even if they dont have special cryptographic software (like GPG). You
want to let your friends and colleagues decrypt the file, even if they do not have your
public key or know-how to use public key cryptography (like GPG). Use the good old "zip" to
help you. Here's how:
Use "zip -e foo.zip foo" to encrypt and zip the file foo. Give password when prompted.
You will need the password for decryption, so store it safely.
Decrypt : Use "unzip foo.zip" Give password when prompted..
Note: This method is much more versatile than you think :
- You can use this method for encrypting text files as well as binary files.
- You can encrypt a whole structure consisting of directories, sub-directories, and files.
- You can use all other zip command options with the above.