Decrypt TrueCrypt containers using dm-crypt

7,536

Yes you can do that. I use an external harddrive and mount it on my Ubuntu installations with cryptsetup/dm-crypt. But you need to update your cryptsetup packages to version 1.6 to get this functionality. I used this PPA on older Ubuntu releases.

Mounting a container is no different from mounting an encrypted partition as one would expect:

$ sudo cryptsetup tcryptOpen testcontainer.tc testcontainer

Now a new disk shows up in Nautilus or the launcher and you can mount it via Nautilus or terminal if you like. I mounted the container via Nautilus.

$ mount | grep testcontainer
/dev/mapper/testcontainer on /media/livewire/F29F-27D2 type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)

Don't forget to unmount the filesystem and the container itself after unmounting the filesystem:

$ sudo cryptsetup tcryptClose /dev/mapper/testcontainer

While a GUI only solution to mount such containers and partitions the same way you can mount LUKS partitions would be more comfortable, it is currently not possible as it seems.


Automounting via pam_mount also seems to be not possible at the moment.

Share:
7,536

Related videos on Youtube

oshirowanen
Author by

oshirowanen

Updated on September 18, 2022

Comments

  • oshirowanen
    oshirowanen over 1 year

    Is it possible to decrypt TrueCrypt containers using dm-crypt?

    I have some container files created with TrueCrypt and I just wanted to know if it's possible to decrypt them using dm-crypt so I can stop using TrueCrypt and use something more opensource like dm-crypt.

  • Csabi Vidó
    Csabi Vidó about 10 years
    I don't know of a Windows program that can read LUKS partitions/containers. So compatibility to Windows might be the reason?
  • oshirowanen
    oshirowanen about 10 years
    Doesn't seem to work for me. sudo cryptsetup tcryptOpen testcontainer.tc testcontainer give me cryptsetup: Unknown action.
  • Csabi Vidó
    Csabi Vidó about 10 years
    @oshirowanen That sounds like you're using an older version. You need to upgrade the package (via the PPA I mentioned) if you use an older release than trusy.
  • oshirowanen
    oshirowanen about 10 years
    Looks like I have cryptsetup 1.4.1 installed. Is that version too old?
  • Csabi Vidó
    Csabi Vidó about 10 years
    Yes, you need version 1.6 at least. Really.
  • Tarik
    Tarik over 9 years
    I need the solution to decrypt my truecrypt volumes and transfer them elsewhere. As such, the question is pertinent.