Three ways to easily encrypt your data on Linux
Data encryption is one very solid security measure/precaution that everyone who owns data with significant personal or objective value should perform. What data encryption does is securing your data when they fall into the wrong hands. While there are decryption methodologies and techniques that can be used to decrypt any encrypted data, some of it may not be retrieved, or the time and effort that it will take may lead the decryptor to the decision that your data isn’t worth it. There are many tutorials on howtoforge.com that show one way or another to decrypt your data. This one will show the most easy-to-use tools that can do the job for us. For this purpose, I will showcase the decryption of a removable media drive.
Encrypt with compression
Ok, so you need to quickly encrypt the contents of you pen drive. The easiest solution is to compress them using the 7z archive file format, that is open source, cross-platform, and supports 256-bit encryption using the AES algorithm.
Encrypt with partitioning
Open the utility called “Disks” or “GNOME Disks” and choose your pendrive from the list on the left. Then unmount any mounted partitions of the disk by clicking on the “Stop” button located just under the partitions view. You can also delete them if you want by pressing the “Minus” button just next to it.
The next step is to add a new partition by pressing the “Plus” button. A new window will pop up, so you can choose the “Encrypted” option on the “Type” options list. Define the size from the top, and then add a name and a strong passphrase. Every time you try to mount the disk, you will be asked for this passphrase.
Encrypt with Seahorse
The third option that I will show basically utilizes the popular GNU PG tool to encrypt anything you want in your disk. What we need to install first are the following packages: gpg, seahorse, seahorse-nautilus, seahorse-daemon, and seahorse-contracts which is needed if you’re using ElementaryOS like I do. The encryption will be based on a key that we need to create first by opening a terminal, and typing the following command:
Follow the instructions and choose your options as shown in the following screenshots.
After the technical parameters of the key are set, you will be asked to enter some details that will help with the key generation procedure.
Finally, set a passphrase and let gpg generate the key. Doing things like moving your mouse or writing some text help in the generation of a good key.
After this is completed, you can close the terminal and navigate to your removable volume again to locate the files you want to encrypt. Select the files and right click to choose the “encrypt file” option.
This will open up a new window allowing you to select which key you want to use for the encryption. Choose the one you want and click the “Ok” button and you’re done.