How To Install & Use TrueCrypt In Ubuntu To Encrypt Files & Folders

If you are little interested in obtaining a higher level of security for your data, then I’m sure you would like this little software. Perhaps you have heard of encryption if not, encryption is just the way to transform plain text files into Ciphertext. To be more clear, encryption just makes the normal files like songs, movies, documents, etc. into something that human can’t understand, only machines can understand after inserting a secret key.  We can too encrypt our secret files with TrueCrypt, still safe to work with. Let’s see how to do that in Ubuntu Linux and other derivative OS.


What Is Encryption?

Above I told briefly that what Encryption is, let’s see a little more about encryption and then move on to second step to see how we can secure our files in our Linux machines by encrypting them. For now, let’s see what encryption is. Encryption is the way to convert the plain text files into Ciphertext. If you don’t understand what plain text means, then this does not only mean the text file like, .doc, .txt, etc. but the plain text can be pretty much everything we see in our computer without any secret key, password, fingerprint, etc. Normally most of our data is in plain text when contained in a normal folder.

Why Do We Need Encryption?

If you were not aware of the encryption, then you are probably thinking that why we need encryption. Why I would want to store our normal files into a format that I can’t understand. If I can’t understand then how would I be able to play, run or open those non-understandable files? Well, that’s not so. I have mentioned that human can’t understand encrypted data and in case, you try to open an encrypted file, you’ll get an error or if you open an encrypted file with a text editor, then there will be only “teximbles” (text+symbols). The only way to access an encrypted file is a password/passphrase/keyfile. When we encrypt any file then we set a key/password/fingerprint etc. and we keep it safe in our memory. The next time we try to open that file, just enter that key and Voila! the file will be decrypted and you’ll be able to use it. Encryption is one of the best ways to secure our important/secret files like passwords, important documents, lectures, audio files, etc. from being read/played/used by an unwanted person. Many times your data is mistakenly shared, sometimes hacked, or read by your neighbor. When you keep your important files encrypted they are secure. Even if somebody gets them and tries to open then he can’t.

TrueCrypt

TrueCrypt is a nice tool, but the developer dropped the development of the tool in May 2014. Although the development has been stopped but open-sourcing is still making it to breathe. TrueCrypt 7.1a is what you will be using now. The official website is providing TrueCrypt 7.2 as the latest version, but that’s no longer being maintained. But the Gibson Research Corporation argues TrueCrypt is still safe to use. Since the release of TrueCrypt 7.1a, the tool has been used by millions of people around the world. TrueCrypt has also undergone the audit and there was not even a single issue found in the code. GRC says,

Those who believe that there is something suddenly “wrong” with TrueCrypt because its creators have decided they no longer have so much to give are misguided.“This is the Gibson Research Corporation’s argument based on certain facts. Other than GRC, a non-profit committee to protect journalists advised that TrueCrypt is still safe to use for journalists.

Personally, I think there may be something going on among the real developers that they made such a statement that TrueCrypt can’t be trusted in anyone else’s hand. Yes, they did forget TrueCrypt is an open source and anyone can develop it in a good way. I am using and suggesting TrueCrypt based on certain facts that it’s being used by millions of users and second there was no problem with the code in the audit. Let me know what you think about using TrueCrypt after all of these arguments and statements. Do take the below poll and tell us in the comment what you think about it.

Now let’s jump to the tutorial part. If you are using Ubuntu Linux and you want to encrypt files or folders then that’s super easy with TrueCrypt. TrueCrypt makes an encrypted file of a certain size and user can keep any type of data into it. The data kept inside the file will be encrypted and can only be accessed with either a keyfile or a password.

How To Install TrueCrypt In Ubuntu Linux

You can simply install TrueCrypt in Ubuntu Linux by adding a PPA. Step 1 – Open Terminal and add the PPA using the following commands –

$ sudo add-apt-repository ppa:stefansundin/truecrypt
Step 2 – Update your local repositories list and install TrueCrypt
$ sudo apt-get update$ sudo apt-get install truecrypt
Congratulation! You have successfully installed TrueCrypt in Ubuntu.

How To Encrypt Files & Folders In Ubuntu With TrueCrypt

Once you have installed TrueCrypt you can easily launch it from the system menu or dash if you’re using Unity environment. You will get the following main screen of TrueCrypt.

As you can see the main screen has some options, there are many slots. Now how TrueCrypt works is that it makes a place in your disk where you keep all of your files that you want to encrypt. The file where all encrypted files are kept is called Container. So whenever I say container that simply means the folder where we keep all of our files that we want to encrypt. Here We’ll first create a Volume. Select any number and click Create Volume.

Now there are two options. The first option ‘Create an encrypted file container’. Do you get that? This is what I mentioned, it will create a folder where we’ll put our files to be converted. The second option is ‘Create a volume within a partition/drive’. This option will encrypt any external HD, USB, etc.

Select the first option to encrypt local files & folders and press next.

Here we have another two options. Select the first option for a normal TrueCrypt volume otherwise second option is for specific conditions, read the instructions below the second option for more on ‘Hidden TrueCrypt volume’. I need first for just the normal volume. Click next.

Here is what I mentioned before about the container. Now TrueCrypt wants you to select the place you want to keep the container file, for example, I have chosen a folder inside my Home directory to keep the container. Also, give the name of the container, I gave Encrypted folder, for example. Click Next.

Next is to select the type of encryption algorithm. There are numerous in TrueCrypt. I’ll choose AES because this is used by most government agencies including the US government. You can read more about Encryption Standard here. Also, select the Hash Algorithm. I’ve chosen SHA-512. For more information on Hash Algorithm read Comparison of cryptographic hash functions.

Now the nex last step is to specify the size of the container. A container of 2 GB can contain 2 GB of files encrypted. Specify any size of your needs.

Set the password in the next window. Remember, this should be long enough as per suggested by the software itself, a minimum of 20 characters. There is also an option for making a Keyfile. A keyfile is simply like a text file that you will enter when decrypting files. I don’t suggest using creating keyfile because you will have to keep it on your computer or USB to always insert it when decrypting files. In keyfile case, you will have to secure the keyfile itself. Once keyfile is stolen all of your files are accessible.

Next is to select the partition type. I suggest using Linux Ext4, It’s faster. If you believe others are better then go ahead with other types. Click Next.

Next, select support. Do you want to mount the volume any other platform also beside Linux, then select the first option otherwise select the second option? Click Next.

In the next screen move your mouse pointer randomly longer to increase the cryptographic strength. Finally, click Format. And there you go! You have created an encrypted volume. Now you can keep any file that you want to encrypt inside. The next we’ll see how to keep our files to encrypt them and then decrypt files when we need it.

When you have created a volume, close the setup wizard and follow these steps to mount that volume into your system.

To mount the encrypted volume to keep files, first select the volume file that we created above and then select any number that you want to specify to the drive and click Mount.

You will be prompted to enter the password of the volume that we set in this step. After the volume password, you may be asked to enter the system password. Enter the system password and done! Now the drive has been mounted. Open the file manager and access the volume. You can keep any files you want to encrypt. The size of the volume is what you set in this step while creating volume. Whatever the files & folders you keep inside this volume will be encrypted once you demount the volume. It’ll be no longer accessible without the password or keyfile.

Always remember to demount the volume when you have to use the volume. To demount the volume, select the drive number that we set in this step, and click Demount.

How Much You Liked TrueCrypt?

Encrypting files using TrueCrypt is additional and strong security for your secret files. Although the setup takes a bit longer, that’s not tough. Once you’ve setup volume of your desired size there won’t be any trouble accessing it. I like using TrueCrypt to secure my Keepass password file. Read more about Keepass password manager here. Tell us below in the comment about how much like encrypting files using  TrueCrypt. If you’re using any other encryption software on Linux then comment in the below, I’ll be happy to review that.