Create Encrypted Filesystem Within a File (truecrypt way)

Some time ago I’ve written an article named 16 GB encrypted candy file describing how to create encrypted filesystem within regular file. After quick research it became clear that cryptoloop is vulnerable and there is open exploit available on the web: see it here (thanks to everybody who commented that article). So I don’t recommend to use cryptoloop but instead take a look at truecrypt that makes it possible not only to encrypt whole storage but also to create encrypted file just like I’ve described in 16 GB encrypted candy file article.

Truecrypt is cross platform disk/file encryption software that is available for windows, mac os and linux. In order to get started visit www.truecrypt.org site and download the latest version of this software (direct link) and install it:

cd /usr/src
sudo -s
wget -c http://truecrypt.sourceforge.net/
tar -xvzf truecrypt-6.3a-linux-x86.tar.gz
./truecrypt-6.3a-setup-x86
exit

When installation is finished you will see Trucrypt item in Gnome menu (if not or use different X manager — type truecrypt in command line). Here how it looks like:

truecrypt

In order to create encrypted file press “Create Volume” button and follow instructions:

truecrypt

truecrypt

truecrypt

truecrypt

truecrypt

Use long passwords like “e07910a06a086c83ba41827aa00b26ed” instead of “123” or “iloveyou”:

truecrypt

truecrypt

truecrypt

truecrypt

Once encrypted candy is created you can store it on usb flash drive or elsewhere, it doesn’t matter how that storage is formatted — it can be CD or windows formatter ipod.

Use the same utility to open the file — press “Select File” and point to newly created encrypted file, then choose first slot and select “Mount Volume” in drop down menu (it will ask for your sudo password and then password you typed when created the file):

truecrypt

As the result encrypted filesystem will be mounted into /media/truecrypt1 directory:

truecrypt

Copy your sensitive files there and unmount /media/truecrypt1 when done (select “Dismount” in drop down menu).
Good luck!

SHARE:
nv-author-image

Stefan Durand

My name is Stefan, I'm the admin of LinuxScrew. I am a full-time Linux/Unix sysadmin, a hobby Python programmer, and a part-time blogger. I post useful guides, tips, and tutorials on common Linux and Programming issues. Feel free to reach out in the comment section.

Leave a Reply

Your email address will not be published. Required fields are marked *