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://www.truecrypt.org/download/truecrypt-6.3a-linux-x86.tar.gz
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!

 
 
» You might also be interested in the following articles:
16 GB encrypted candy file
Create Linux user with password
Make linux shell scripts encrypted
Anatomy of the Linux file system
How to create custom linux ISO image?



» Want to stay up to date? Subscribe to our E-MAIL or RSS feed!

2 Responses to “Create Encrypted Filesystem Within a File (truecrypt way)”


  1. 1 Andriy

    cryptsetup is my favorite. It has following advantages:
    1) It encrypts full partition. root and swap also can (and should) be encrypted.
    2) It is available at least for Ubuntu and Fedora during installation.

  1. 1 Links 10/5/2010: Loads of GNU/Linux Gaming News, Mandriva Rumours | Techrights

Leave a Reply




Friendly Sites:Who is behind Linux Screw?
GeekyBits³ | Bash Cures Cancer | OMG! Ubuntu!
My SysAd Blog | Web Upd8
ZEPY | Linux config Wiki | Planet Sysadmin
a non-geek's linux notes | Linux Today
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem N. (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››