



The key on the dongle is password protected, so effectively you add another level of encryption by using a dongle. Using a plaintext key would be quite dumb from a crypto point of view.Death Valley Pete wrote:Looks promising. I'm trying to figure out how to make this whole thing work, but without the usb dongle. (i.e. with a prompt for a password, the thought being that a dongle would be too easily compromised). Any hints?

I am sincerely sorry if the documentation is too complex -- I am trying to write it all down, and afterwards some editing to get some simple "paths" through all this.Death Valley Pete wrote:Looks promising. I'm trying to figure out how to make this whole thing work, but without the usb dongle. (i.e. with a prompt for a password, the thought being that a dongle would be too easily compromised). Any hints?

gmoney wrote:My existing fstab entry is:
/secure/home /home ext3 encryption=AES256,sync,exec,noatime 0 0
and my 2.6 version is:
/secure/home /home ext3 sync,loop,keybits=256,encryption=aes,exec,noatime 0 0
Has anyone has any luck with mounting a loopback-aes encrypted filesystem from 2.4 to the kernli system in 2.6?
Code: Select all
/secure/home /home ext3 sync,loop,encryption=aes-256-cbc,exec,noatime 0 0
Code: Select all
# modprobe tcrypt

Well then, I guess I'll just shut up and let you finish.watersb wrote: I am sincerely sorry if the documentation is too complex -- I am trying to write it all down, and afterwards some editing to get some simple "paths" through all this.
I will be adding the more-simple, non-USB method to the documentation soon. The section "framework" should already be there.
Until then, see http://www.flyn.org/projects/cryptoswap/index.html
Good point. I guess I'll start saving my pocket change...bonsaikitten wrote: The key on the dongle is password protected, so effectively you add another level of encryption by using a dongle. Using a plaintext key would be quite dumb from a crypto point of view.



ro0t wrote:
the system is workin fine the only problem i am havin is that .. /initrd .. is mounted readonly ..
if i try umount /initrd .. it sayz DEVICE BUSY . :?
can n e one explain y its still mounted after booting and how to umount it automatically when system boots ..

Code: Select all
root@outback home # mount ./ftp
Password:
ioctl: LOOP_SET_FD: Device or resource busy
Code: Select all
/dev/loop5 /home/ftp reiserfs defaults,noauto,loop=/dev/loop5,encryption=AES256 0 0watersb wrote:Kernel 2.6 System Encryption
I am pleased to announce that with Mike Petullo's and David Braun's help, I have been able
to get an encrypted-root system WORKING with my Gentoo 2.6 laptop, using
a random string that is stored on a USB dongle; this string is encrypted
with GPG.
Work in progress documentation is available at
http://www.sdc.org/~leila/usb-dongle/rough-readme.txt
and at
http://www.sdc.org/~leila/usb-dongle/readme.html
The entire setup - a minix-based RAMDisk, and a tarballed filesystem for
the USB-dongle - has been posted to
http://www.sdc.org/~leila/usb-dongle/
This setup is working for me on an x86 system; you will need to replace
the binaries on the usb tarball with your actual binaries (just copy
them over from a working linux system, taking care to copy over any
shared libs as well).
Although I am starting to use this setup in production use, I keep
backups of everything, and assume it is going to eat my hard disk at any
moment. More pounding is needed.
At this point I want to focus on getting the documentation completed.
How does it look so far?

i did "losetup -e AES256 -T /dev/loop0 /dev/hda4"Ok boot into knoppix w/o the graphical
run losetup -e AES256 -T /dev/loop0 /dev/hda2 (or whatever is your root partition)
i did mkreiserfs /dev/loopthen do mke2fs /dev/loop0 (or whatever file system you want)
done (except of replacing "mount /dev/hda1 with mount /dev/hda2" i did the same).then mkdir /mnt/gentoo
and then mount /dev/loop0 /mnt/gentoo
and mkdir /mnt/gentoo/boot
and mount /dev/hda1 /mnt/gentoo/boot
then cd into /mnt/gentoo
and then extract whatever stage you want and procede from there following the instruction guide.
when you get to the kernel:
Quote:
You HAVE to use CONFIG_MODULES=y, CONFIG_BLK_DEV_LOOP=n (y or m WONT WORK), CONFIG_BLK_DEV_RAM=y, CONFIG_BLK_DEV_RAM_SIZE=4096, CONFIG_BLK_DEV_INITRD=y, CONFIG_MINIX_FS=Y (this is because the ramdisk is minix), CONFIG_PROC_FS=y plus whateve FILESYSTEM YOUR ROOT IS HAS TO BE Y (modules wont work because the kernel can't get modules from the root file system until it knows how to read it and decrypt it when it is booting, other stuff can be modules if you want). Make sure that your new kernel works before going further.
donepatch -p1 <../util-linux-2.11y.diff
export CFLAGS=-O2
export LDFLAGS='-static -s'
./configure
make SUBDIRS="lib mount"
cd mount
install -m 4755 -o root mount umount /bin
install -m 755 losetup swapon /sbin
rm -f /sbin/swapoff && ( cd /sbin && ln -s swapon swapoff )
rm -f /usr/share/man/man8/{mount,umount,losetup,swapon,swapoff}.8.gz
install -m 644 mount.8 umount.8 losetup.8 /usr/share/man/man8
install -m 644 swapon.8 swapoff.8 /usr/share/man/man8
rm -f /usr/share/man/man5/fstab.5.gz
install -m 644 fstab.5 /usr/share/man/man5
i did "cd /usr/src/loop-AES..." and then "make LINUX_SOURCES=/usr/src/linux-2.4.22-ac4"cd /usr/src/loop-AES-v1.7b
make LINUX_SOURCE=/usr/src/linux-2.4.19-gentoo-r10 (or whatever vers. you have)
i did "cp -p /lib/modules/2.4.22-ac4/block/loop.o /boot/loop-2-4.22-ac4.o"cp -p /lib/modules/2.4.19-gentoo-r10/block/loop.o /boot/loop-2.4.19-gentoo-r10.o
i did BOOTDEV=hda2, BOOTTYPE=ext3, CRYPTOROOT=hda4, ROOTYPE=reiserfs, CYPHERTYPE=AES256and then do these steps
In the loop-AES directory edit build-initrd.sh. Change BOOTDEV, BOOTTYPE, CRYPTROOT, ROOTYPE and CIPHERTYPE to what you want. Then type sh build-initrd.sh . This makes a ramdisk so that the kernel knows how to get the pass phrase when you boot later.
replaced /dev/ROOT with /dev/loop5 (/dev/hda4 wasn't there cause the installation was fresh where the default entries are /dev/BOOT, /dev/SWAP and /dev/ROOT). and changed the /boot filesystem to ext3 and the /root filesystem to reiserfs.edit fstab to make your root say /dev/loop5 instead of /dev/hdawhatever.
jup, done.cd to /boot/grub and edit grub.conf to add a entry like this:
title=Encrypted Root
root (hd0,0)
kernel /bzImage ro root=/dev/ram1
initrd /initrd.gz