IAM

Check out our latest research on adversarial robustness and generalization of deep networks.

ARTICLE

Installing Truecrypt on Raspbian

The Raspberry Pi can easily be used as Media Center. However, when using Truecrypt-encrypted hard drives, installation can be rather complicated. This article will give detailed instructions on how to install Truecrypt on Raspbian.

For installing Truecrypt on Raspbian I used the following article on carrier-lost.org : Raspberry Pi: Truecrypt on Raspbian. Nevertheless, I came across some minor problems. I succeeded in installing Truecrypt on Raspbian by following these steps:

To install Raspbian, I followed the detailed guide here. To get started with Raspbian I installed Firefox and Nautilus:

$ su
$ apt-get install iceweasel
$ apt-get install nautilus

In addition, make sure the build essentials are installed:

$ apt-get install build-essential

Note: Some of the following commands may require root access, so when not using su as above, use sudo instead. sudo may not be installed in advance. For adding a user to the sudoer list, use

$ adduser <user> sudo

Now we are ready to install Truecrypt:

  • Download the Truecrypt sources from here. As the current 7.2 is missing the Makefile, I (as in [1]) used version 7.1a. The source code is available here: https://github.com/FauxFaux/truecrypt. To unzip the downloaded .zip file use the unzip command:
    $ apt-get install unzip
    $ unzip truecrypt-targz.zip
    $ mv truecrypt-targz truecrypt-7.1a
    
    I renamed the folder containing the truecrypt source files to truecrypt-7.1a.
  • Download the wxWidgets files from here: http://sourceforge.net/projects/wxwindows/files/2.8.11/. I used version 2.8.11. Again, unzip the files:
    $ unzip wxWidgets-2.8.11.zip -d wxWidgets
    
  • As described in [1], we need to download some needed header files. Download all *.h files from here: ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/ and place them in Truecrypt/pkcs/. This can also be done using the command line:
    $ mkdir truecrypt-7.1a/pkcs
    $ wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/*.h -P truecrypt-7.1a/pkcs/
    
  • Now, we need to install the following libraries:
    $ apt-get install build-essentials
    $ apt-get install pkg-config
    $ apt-get install gtk2.0-dev
    $ apt-get install libfuse-dev
    
    For a detailed list of requirements, see the README.txt of the Truecrypt download:
    Requirements for Building TrueCrypt for Linux and Mac OS X:
    -----------------------------------------------------------
    
    - GNU Make
    - GNU C++ Compiler 4.0 or compatible
    - Apple Xcode (Mac OS X only)
    - NASM assembler 2.08 or compatible (x86/x64 architecture only)
    - pkg-config
    - wxWidgets 2.8 shared library and header files installed or
      wxWidgets 2.8 library source code (available at http://www.wxwidgets.org)
    - FUSE library and header files (available at http://fuse.sourceforge.net
      and http://code.google.com/p/macfuse)
    - RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20
      header files (available at ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20)
      located in a standard include path or in a directory defined by the
      environment variable 'PKCS11_INC'.
    
  • After installing all needed libraries, we are ready to compile wxWidgets. First configure and build wxWidgets (if ./configure does not work immediately, chmod +x configure may be appropriate). This may take some time ...
    $ cd wxWidgets
    $ ./configure
    $ make 
    $ make install
    
  • Now, we are ready to install Truecrypt:
    $ cd ../truecrypt-7.1a
    $ export PKCS11_INC=/home/david/truecrypt-7.1a/pkcs/
    $ make NOGUI=1 WX_ROOT=/home/david/wxWidgets-2.8.12 wxbuild
    $ make NOGUI=1 WXSTATIC=1
    
    This, as well, may take some time. Note that my username is david - so the paths /home/david/truecrypt-7.1a/pkcs/ and /home/david/wxWidgets-2.8.12/ need to be adapted accordingly.
  • Move the executable to the /usr/local/bin directory:
    $ cp Main/truecrypt /usr/local/bin/
    

To check whether truecrypt has been installed successfully:

$ truecrypt --version

which will be TrueCrypt 7.1a.

Truecrypt is installed and can be used as follows, for example for mounting an external hard drive which is encrypted using truecrypt:

$ mkdir /media/truecrypt/
$ fdisk -l
$ truecrypt /dev/sda1 /media/truecrypt/

Here, fdisk -l is used to see whether the external hard drive is available (to know that we want to mount /dev/sda1).

References

What is your opinion on this article? Did you find it interesting or useful? Let me know your thoughts in the comments below or get in touch with me:

@david_stutz