TrueCrypt

From Segfault
Jump to navigation Jump to search

NOTE: TrueCrypt has been discontinued and should not be used for anything serious!

Installation

apt-get install dmsetup 
wget -q -O - https://www.truecrypt.org/download/TrueCrypt-Foundation-Public-Key.asc | gpg --import
wget https://www.truecrypt.org/download/truecrypt-7.0a-linux-console-x86.tar.gz{,.sig}

Verify the signature:

$ gpg --verify true*.sig
gpg: Signature made Sun 05 Sep 2010 09:47:21 AM PDT using DSA key ID F0D6B1E0
gpg: Good signature from "TrueCrypt Foundation <contact@truecrypt.org>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: C5F4 BAC4 A7B2 2DB8 B8F8  5538 E3BA 73CA F0D6 B1E0

Unpack & install:

tar -xzf truecrypt*.tar.gz

./truecrypt*setup*
tar -xzf $TMPDIR/truecrypt_7.0a_console_i386.tar.gz
mkdir /opt/truecrypt && mv usr/* /opt/truecrypt

Usage

Unlock the TrueCrypt device:

$ /opt/truecrypt/bin/truecrypt --keyfiles="" --filesystem="none" --protect-hidden=no /dev/sdc1 
Enter password for /dev/sdc1: 
  
$ /opt/truecrypt/bin/truecrypt --list /dev/sdc1
1: /dev/sdc1 /dev/mapper/truecrypt1 - 

Now we can mount the filesystem:

$ file -Ls /dev/sdc* /dev/mapper/truecrypt1 
/dev/sdc:               x86 boot sector, Microsoft Windows XP MBR, Serial 0xcb4a53fb [...]
/dev/sdc1:              data
/dev/mapper/truecrypt1: x86 boot sector, code offset 0x3c, OEM-ID "MSDOS5.0", [...]
$ mount -t vfat /dev/mapper/truecrypt1 /mnt/tc
$ df -h /mnt/tc
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/truecrypt1 465G  300G  166G  65% /mnt/tc

Unmounting the filesystem and freeing the mapping device:

/opt/truecrypt/bin/truecrypt --dismount /dev/sdc1