Loopback encryption

Michael Bach (gmx) bach.michael at gmx.net
Thu Apr 26 09:45:30 UTC 2007


Hello,
I have an external usb-harddisk, about 200Gbyte available, on which I 
would like to safe some data encrypted. I read some articles about the 
subject. I finally decided to create a file of 200GByte which will 
contain an encrypted file-system.
This basically creates a single file of 200GByte which is useless to 
anybody who doesn't know the encryption algorithm and the password.

The procedure is fairly simple: it's described in "man losetup" :
"--" are my comments

[clip]

-- create a file which will contain the encrypted file system:
# dd if=/dev/zero of=/file bs=1k count=100
-- mount the file on /dev/loop0 and encrypt it "on the fly"
-- use encryption algorithm "des"
# losetup -e des /dev/loop0 /file
   Password:
   Init (up to 16 hex digits):
-- create a files system
# mkfs -t ext2 /dev/loop0 100
-- mount the loop0 device on local mountpoint /mnt
# mount -t ext2 /dev/loop0 /mnt
   ...
-- unmoount
# umount /dev/loop0
-- detach the loop0 device
# losetup -d /dev/loop0

[clip]

Now I have two questions:
1.) About the encryption algorithm which one is fast, which one is 
secure and which is a good trade-off?
2.) Has anybody made some experience with loopback encryption. What are 
the drawbacks? I heard about the "crypto hell" when kernel versions change?

regards, Mike




More information about the kubuntu-users mailing list