PDA

View Full Version : How to create Truecrypt encrypted container file under Linux?



Fli
01-10-2014, 10:47 AM
Are there any linux tutorials on how to create Truecrypt container for storing sensitive data?

I did it installed it first on my centos:


yum install truecrypt

then read manual:

truecrypt -h



...
Examples:

Create a new volume:
truecrypt -t -c


Mount a volume:
truecrypt volume.tc /media/truecrypt1


Mount a volume as read-only, using keyfiles:
truecrypt -m ro -k keyfile1,keyfile2 volume.tc


Mount a volume without mounting its filesystem:
truecrypt --filesystem=none volume.tc


Mount a volume prompting only for its password:
truecrypt -t -k "" --protect-hidden=no volume.tc /media/truecrypt1


Dismount a volume:
truecrypt -d volume.tc


Dismount all mounted volumes:
truecrypt -d

then create Truecrypt container file:

truecrypt -c



[root@vps ~]# truecrypt -c
Volume type:
1) Normal
2) Hidden
Select [1]: 1


Enter volume path: /root/backup.tc


Enter volume size (sizeK/size[M]/sizeG): 6G


Encryption algorithm:
1) AES
2) Serpent
3) Twofish
4) AES-Twofish
5) AES-Twofish-Serpent
6) Serpent-AES
7) Serpent-Twofish-AES
8) Twofish-Serpent
Select [1]: 5


Hash algorithm:
1) RIPEMD-160
2) SHA-512
3) Whirlpool
Select [1]: 3


Filesystem:
1) FAT
2) None
Select [1]:


Enter password:
Re-enter password:


Enter keyfile path [none]:


Please type at least 320 randomly chosen characters and then press Enter:
Characters remaining: 309
Characters remaining: 309
...
Characters remaining: 194
Characters remaining: 98




Done: 100.000% Speed: 22 MB/s Left: 0 s


The TrueCrypt volume has been successfully created.


Now mounting "volume" file we just created:


[root@vps ~]# truecrypt /root/backup.tc /root/backupWarning: Your system uses an old version of the Linux kernel.


Due to a bug in the Linux kernel, your system may stop responding when writing data to a TrueCrypt volume. This problem can be solved by upgrading the kernel to version 2.6.24 or later.
Enter password for /root/backup.tc:
Enter keyfile [none]:
Protect hidden volume (if any)? (y=Yes/n=No) [No]:
Error: fuse: device not found, try 'modprobe fuse' first
[root@vps ~]#
[root@vps ~]# modprobe fuse
FATAL: Could not load /lib/modules/2.6.18-348.3.1.el5.028stab106.2/modules.dep: No such file or directory

Alas im on OpenVZ VPS and here is tutorial on how to setup FUSE:
https://openvz.org/FUSE

But i did not succeeded. After followed above tutorial i restarted VPS and when tried to mount TC contianer, it returned:
"Error: Failed to set up a loop device:
/tmp/.truecrypt_aux_mnt1/volume" here is the issue on TC forum (http://forums.truecrypt.org/viewtopic.php?t=29348).
Any idea please?