[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

aespipe decryption issue



I've been playing around with loop-aes and aespipe lately, and have
encrypted my hard drive with loop-aes, but want to decrypt it, and
re-encrypt it with a new key.

As a test before I try this with my actual hard drive I encrypted a USB
key chain I have with a dummy file (using a key)

sda = usb device name
key.gpg = a AES256 symmetric gpg key, so no -G option needed

I encrypted it using

dd if=/dev/sda bs=64k | aespipe -e AES256 -K /key.gpg | dd of=/dev/sda
bs=64k conv=notrunc

I mounted it on a loop saw the dummy file and unmounted it:

mount /dev/sda /mnt/sda -o loop=/dev/loop0,encryption=AES256,gpgkey=/key.gpg

umount /mnt/sda

Then when I decrypted it:

dd if=/dev/sda bs=64k | aespipe -d -K /key.gpg | dd of=/dev/sda bs=64k
conv=notrunc

Then I tried to normally mount it with no loop because it was decrypted
and there were problems

mount /dev/sda
wrong filetype, bad superblock...

mount -t auto, mount -t vfat, mount -t ext2, mount -t ext3... all
produced the same error message.

Does the decryption process somehow destroy the filesystem structure or
superblock.  How can I decrypt this and still have a usable drive?  Is
there another step?  I am no filesystem expert, but has anyone done this
and seen expected results?

TIA,
David

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/