Annexe
C : making crypted disk by hands.
- You have cryptography running on your system, losetup patched,
let's go...
- Just to be sure : We will make a crypted disk, this will ERASE
all data stored on the disk......
- To create a crypted disk, we first need to know the device
number.
- for security reason, unplug any storage disk, and other scsi disk
- WARNING : Crypted device may not be stable. this is a
kernel/crytoapi problem, not GETD.
- When dealing with such disk, ALWAYS umount them correctly, it's
mandatory. ( umount be of GETD is a good solution )
Getting
the device number
- Here the big thread is to get the right device, meanning not
formating something else !!!!!
- Exit from GETD ( umount the disk you want to crypt )
- Be sure only ONE usb storage disk is plugged. the one we're going
to crypt.
- Go into /proc/scsi. ( meanning on directory /proc/scsi ).
- There is one or more directory usb-storage-x. open on a file
editor the file you found on each.
- Since only one disk is plugged, in only one of those files you
must read "Attached: Yes"
- the line "Host scsi1: usb-storage" give you the device number :
- scsi0 : /dev/sda1
- scsi1 : /dev/sdb1
- scsi2 : /dev/sdc1 ....
Crypting...
- On a xterm do :
- losetup -e <cipher-type> -k 256 /dev/loop0 <the
device>
- enter the password you want. WARNING : there's no echo, no
correction, once you formated the disk with this pass, the only one
solution to change it is.... to create a new crypted disk over it....
- to crypt with cipher "serpent" on the previous ex :
- losetup -e serpent -k 256 /dev/loop0 /dev/sdb1
- Here I suppose you have nothing through loopback, in case , use
loop1, loop2, well you know that...
- keysize of 256 is mandatory, GETD won't use anyone else.
- Again on a xterm, we will set a file system. Though there's no
restriction, everyone will strongly recommand you to stick with ext2
file system, avoid journalized and vfat.
Start
- Now just start GETD, and plug the device.
- It won't mount, edit setting for crypted disk, enable auto mount
- unplug, plug enter password...
Futur....
- already said, just for remember. You will soon do that from GETD.
On
a file...
- putting a virtual crypted disk on a 50Mb file...
- dd bs=1M count=50 if=/dev/zero of=cpfile
- losetup -e serpent -k 256 /dev/loop0 cpfile
- mkfs.ext2 /dev/loop0
- Read annexe C for an exemple.