New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Compile and install Truecrypt 6.2a on Bubba2 v1.2.2

A collection of tips on howto tweak your Bubba.
Post Reply
skulkrik
Posts: 8
Joined: 14 Oct 2009, 14:34

Compile and install Truecrypt 6.2a on Bubba2 v1.2.2

Post by skulkrik »

This is a quick overview of how I compiled and installed truecrypt on my Bubba2. The Bubba2 has been updated to v1.2.2

## First steps

Code: Select all

su
mkdir tmp
cd tmp
- Get TrueCrypt 6.2a Source.tar.gz from http://www.truecrypt.org/downloads2.php and put it in tmp folder
- Get wxWidgets-2.8.10.tar.gz from http://www.wxwidgets.org/downloads/ (get the wxAll version) and put it in tmp folder

## Unpack and get all the other files you need

Code: Select all

tar xvzf TrueCrypt 6.2a Source.tar.gz
tar xvzf wxWidgets-2.8.10.tar.gz
mkdir pkcs11
cd pkcs11
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
cd ..
## Update and install dependencies

Code: Select all

apt-get update 
apt-get install build-essential libfuse-dev fuse-utils libgtk2.0-dev dmsetup
## Build truecrypt. NOTE: This can take a while...

Code: Select all

cd truecrypt-6.2a-source/
export PKCS11_INC=/tmp/pkcs11
make NOGUI=1 WX_ROOT=/tmp/wxX11-2.8.10 wxbuild
make NOGUI=1 WXSTATIC=1
cd Main
./truecrypt --test
cp truecrypt /usr/local/bin/
skulkrik
Posts: 8
Joined: 14 Oct 2009, 14:34

Re: Compile and install Truecrypt 6.2a on Bubba2 v1.2.2

Post by skulkrik »

There are still one major problem. Truecrypt 6.2a use the XTS and LRW support in the kernel. Both of these modules are experimental and they are not included in the kernel used by Bubba2 v1.2.2.

You can either compile them and load the modules into your kernel or do the mounting like this

Code: Select all

truecrypt -m=nokernelcrypto volume mountpoint
The negative side of using the nokernelcrypto is decreased performance.

So far I have not had the need/energy to compile the modules so I accept the decreased performance.
skulkrik
Posts: 8
Joined: 14 Oct 2009, 14:34

Re: Compile and install Truecrypt 6.2a on Bubba2 v1.2.2

Post by skulkrik »

I have now tested the performance and the stats I got was

My mounted truecrypt volume - mounted with -m=nokernelcrypto

Code: Select all

server:/home/storage/test_mnt# dd if=/dev/zero of=bigfile bs=100K count=1K
1024+0 records in
1024+0 records out
104857600 bytes (105 MB) copied, 53.6818 seconds, 2.0 MB/s
The ordinary drive used in my Bubba2

Code: Select all

server:/home/storage# dd if=/dev/zero of=bigfile bs=100K count=1K
1024+0 records in
1024+0 records out
104857600 bytes (105 MB) copied, 6.016 seconds, 17.4 MB/s
johannes
Posts: 1470
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Re: Compile and install Truecrypt 6.2a on Bubba2 v1.2.2

Post by johannes »

This is nice, thanks for sharing (and sorry for the late notice on my side, have been a bit too lazy on this forum the last months). About performance, how does it work in reality, fx what SMB performance do you get?
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Re: Compile and install Truecrypt 6.2a on Bubba2 v1.2.2

Post by tor »

skulkrik,

Could you test this with kernel crypto enabled? I believe that there might be support for this in the latest kernel releases.

/Tor
Co-founder OpenProducts and Ex Excito Developer
skulkrik
Posts: 8
Joined: 14 Oct 2009, 14:34

Re: Compile and install Truecrypt 6.2a on Bubba2 v1.2.2

Post by skulkrik »

Hello again

After a lot of real life problems have been solved I finally had time to sit down and update my Bubba2 tonight :)

And the latest testing with Bubba2 2.0 shows that you do not need to use the -m=nokernelcrypto any longer and the throughput has improved quite a lot! Look at the following result.

My mounted truecrypt volume - mounted now without -m=nokernelcrypto

Code: Select all

server:/home/storage/extern# dd if=/dev/zero of=bigfile bs=100K count=1K
1024+0 records in
1024+0 records out
104857600 bytes (105 MB) copied, 20.3145 seconds, 5.2 MB/s
The ordinary drive used in my Bubba2

Code: Select all

server:/home/storage# dd if=/dev/zero of=bigfile bs=100K count=1K
1024+0 records in
1024+0 records out
104857600 bytes (105 MB) copied, 5.78571 seconds, 18.1 MB/s
Thanks for the good work!
skulkrik
Posts: 8
Joined: 14 Oct 2009, 14:34

Re: Compile and install Truecrypt 6.2a on Bubba2 v1.2.2

Post by skulkrik »

A very quick and dirty test of my smb share from a windows xp machine on the local network gave me the following read values when I tried to copy very large files a couple of times.
- Reading from a Truecrypt volume ~3600 kbytes/s
- Reading from an ordinary volume ~9800 kbytes/s
Post Reply