How to Compile TrueCrypt from Source on Debian Linux

By | 2013/10/24

For the paranoid, it is possible to compile TrueCrypt from source on Debian Linux. Here is how to do it!


1. First download the TrueCrypt source from truecrypt.org:

http://www.truecrypt.org/downloads2

-> Mac OS X / Linux .tar.gz


2. Next, extract the download then change into the extracted directory.

$ tar xf 'TrueCrypt 7.1a Source.tar.gz'

$ cd truecrypt-7.1a-source/

3. Install some needed packages:

$ sudo apt-get install build-essential nasm pkg-config wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libfuse-dev libfuse2 libgtk2.0-dev 


4. Grab pkcs headers

The README in the TrueCrypt source outlines needing the following files from this website, specifically. Note that other sources of pkcs11 may not work to compile TrueCrypt.

$ wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11.h
$ wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11f.h
$ wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h


5. Now build TrueCrypt with make:

$ make

6. Done!

If the build completes successfully, cd to the Main directory where you will have the freshly compiled TrueCrypt binary.

$ cd Main/

$ ./truecrypt

Enjoy freshly compiled TrueCrypt:

2 thoughts on “How to Compile TrueCrypt from Source on Debian Linux

  1. Naftuli Tzvi Kay

    To make it a little bit easier to cleanup, I did the compile with Vagrant:

    user@myhost:~ $ cd truecrypt-7.1a-source/
    user@myhost:~/truecrypt-7.1a-source/ $ vagrant init precise64
    user@myhost:~/truecrypt-7.1a-source/ $ vagrant up
    user@myhost:~/truecrypt-7.1a-source/ $ vagrant ssh
    Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)

    * Documentation: https://help.ubuntu.com/
    Welcome to your Vagrant-built virtual machine.
    vagrant@precise64:/vagrant/ $ cd /vagrant/
    vagrant@precise64:/vagrant/ $ $ sudo apt-get install build-essential nasm pkg-config wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libfuse-dev libfuse2 libgtk2.0-dev libwxgtk2.7-dev
    vagrant@precise64:/vagrant/ $ wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11.h
    vagrant@precise64:/vagrant/ $ wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11f.h
    vagrant@precise64:/vagrant/ $ wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h
    vagrant@precise64:/vagrant/ $ make
    vagrant@precise64:/vagrant/ $ logout
    user@myhost~/truecrypt-7.1a-source/ $ sudo cp Main/truecrypt /usr/local/bin

    A few things to note here.

    First, this is obviously targeting 64bit Ubuntu 12.04.

    Second, if you’re really paranoid, you probably shouldn’t do this. If the Vagrant precise64 box image was compromised on purpose, an attacker could setup the box to do malicious things like mess with the binary after it has been compiled. The likelihood of something like this happening should probably be pretty slim, but it’s possible, so you’ve been warned.

    I take no responsibility for anything you do with the commands listed above.

    Reply
  2. Data Recovery

    This article is knowledgeable for the TrueCrypt Windows 8/7/Vista and later offer integrated support for encrypted disk and virtual disk images. Migrate any data encrypted by TrueCrypt to encrypted disks or virtual disk images supported on your platform.

    Reply

Leave a Reply

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

Notify me of followup comments via e-mail. You can also subscribe without commenting.