Re:Truecrypt report
by nbaksalyar on Thursday April 02, 2015 @11:25AM
(#9311226)
And it seems that LUKS supports full disk encryption only, while TrueCrypt allows to use encrypted containers (i.e. single files).
[ Parent
| on HN ]
LUKS supports encryption of block devices. Linux has robust support for using regular files as block devices via the loopback driver, so you can have a file as an encrypted container just fine.
Surely you can use LUKS on a loopback device backed by a single file?
I did so before moving to TrueCrypt. Mounting and dismounting was a bit convoluted compared to TrueCrypt (or encfs), I remember I wrote a Python script to make it a little more convenient.
But it did work fine about five years ago, and I do not think the situation has become worse.
From http://manpages.ubuntu.com/manpages/trusty/man5/crypttab.5.h...
The second field, source device, describes either the block special
device or file that contains the encrypted data. Instead of giving the
source device explicitly, the UUID is supported as well, using
UUID=<luks_uuid>.
That covers the init scripts, and it looks like recent versions of cryptsetup will "do the right thing" if pointed at a file rather than a block device.