All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] cryptsetup and loop-AES devices
@ 2010-12-03 19:11 Markus Porto
  2010-12-03 21:00 ` Milan Broz
  2010-12-04  1:31 ` Arno Wagner
  0 siblings, 2 replies; 3+ messages in thread
From: Markus Porto @ 2010-12-03 19:11 UTC (permalink / raw)
  To: dm-crypt

Hello,

I have a very stupid question concerning dm-crypt: I recently moved to a new
laptop on which I installed Debian squeeze. On my previous laptop (which run
Debian lenny) I used dm-crypt for USB sticks etc. and loop-AES for CDs/DVDs.
In Debian squeeze, somehow loop-AES does not to work anymore (there are a
couple of reports concerning that), but I read on your web page
http://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions that
dm-crypt can also handle loop-AES encrypted devices.

I create an encrypted DVD of the directory /tmp/encrypted_dvd using

cd /tmp
yes "" | dd of=/tmp/encrypted_dvd.iso bs=512 count=16
head -c 3705 /dev/urandom | uuencode -m - | head -n 66 | tail -n 65 | \
 gpg --symmetric -a | dd of=/tmp/encrypted_dvd.iso conv=notrunc
genisoimage -quiet -r /tmp/encrypted_dvd | \
 aespipe -e AES128 -K /tmp/encrypted_dvd.iso -O 16 >> /tmp/encrypted_dvd.iso
growisofs -dvd-compat -speed=8 -Z /dev/dvd=/tmp/encrypted_dvd.iso

so that the first 8192 bytes contain the encrypted keys.

Previously (with Debian lenny), I mounted the DVD using the options
`ro,exec,loop,encryption=AES128,gpgkey=/dev/dvd,offset=8192' which does not
work anymore (error message `ioctl: LOOP_SET_STATUS: Invalid argument,
requested cipher or key length (128 bits) not supported by kernel'). If I
understood properly, the point is that cryptoloop support has been dropped
from the squeeze kernel.

In any case, I still need to read my old CDs/DVDs: How can I do that using
cryptsetup? I read on the web page mentioned above that

losetup /dev/loop0 /dev/dvd
cryptsetup -c aes-plain -h sha256 create encrypted /dev/loop0
mount /dev/mapper/encrypted /media/encrypted_dvd

should do it, but this does not work (/dev/mapper/encrypted is not an
ISO9660 filesystem). I tried to add options -o 4 or -p 4 (I understood that
the size is in blocks and that block size is 2048 bytes for DVDs), and also
several other values such as 16 (block size 512). How do I have to call
cryptsetup in my case?

Many thanks for your kind help.

Best regards,
Markus Porto

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-04  1:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-03 19:11 [dm-crypt] cryptsetup and loop-AES devices Markus Porto
2010-12-03 21:00 ` Milan Broz
2010-12-04  1:31 ` Arno Wagner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.