This is an old revision of the document!


encryption

harddisks usbkeys

dm-crypt & luks

#crypt device
cryptsetup -y -c aes-cbc-essiv:sha256 -s 256 luksFormat /dev/"device_name"
 
#open device
cryptsetup luksOpen /dev/"device_name" "crypt_name"
 
#make filesystem
mkfs.ext4 /dev/mapper/"crypt_name"
 
#mount and fill with random data (fast way)
mount /dev/mapper/"crypt_name" /mnt/
randfs /mnt/random.file
 
#umount and close crypt
umount /mnt/
cryptsetup luksClose "crypt_name"

loop-aes with 100MB file

#create file crypt.aes 100MB
dd if=/dev/urandom of=./crypt.aes bs=2k count=50000
#setup loop, you will be prompted for passphrase
losetup -e aes /dev/loop0 ./crypt.aes
#make FS
mkfs.ext3 /dev/loop0
#release loop
losetup -d /dev/loop0

edit /etc/fstab

/crypt.aes /mnt/       ext3    noauto,encryption=aes   0       0
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
Last modified: le 2009/01/05 15:16