Re: Extracting keyfile from Ram?
Jari Ruusu <jariruusu <at> users.sourceforge.net>
2005-03-05 07:40:56 GMT
Jan Lühr wrote:
> I accidently deleted my loop-aes-keyfile (ironically it happened while
> backuping it)
> However, all loopdevices are mounted at the moment.
> Is there a way to restore my keyfile using the keys loaded into ram?
Encryption keys that are in kernel ram were hashed using one way hash and
are kept in expanded form. Unlike mainline cryptoloop, loop-AES
intentionally does not return the keys using an ioctl() call. Someone would
need to write a new kernel module to extract the data.
- Backup up your data
- Re-create the file system with new key file
- Restore from backup
- This only works for non-root file systems
- Edit /etc/mtab and remove loop mount option from old line:
/dev/hda7 /mnt ext2 rw,loop=/dev/loop0,gpgkey=/root/test1.gpg,encryption=AES128 0 0
so that new line looks like this:
/dev/loop0 /mnt ext2 rw 0 0