Gebruik van deze manuals is uiteraard voor eigen risico, sommige zijn ook nog in ontwikkeling. Kom je iets tegen op deze wiki waar volgens jou niks van klopt? Stuur dan een mailtje naar datkloptniet at tmcr.nl
Linux partitie encrypten met loop-aes
Uit TmcrWiki
Encrypt a normal hard drive partition
You can create an encrypted partition on a normal disk using these same tools. After mounting it, you'll be able to read and write to the encrypted disk just as if it were a normal partition. Unmount and detach the loop device and it's just a scramble of bits on an external hard disk. Cool!
Caution: you'll be reformatting this partition, so any data on it will be lost. Make sure to back up and also make sure you are using the right device name.
This example uses /dev/sda1. Replace that with your encrypted disk's device name.
The cryptoloop manual suggests you fill your partition with random data before encrypting:
dd if=/dev/urandom of=/dev/sda1 bs=1M
Now you just connect the loop device. This will ask for your AES password. You won't be able to change it without starting over and wiping the disk. So pick a good one and don't forget it.
losetup -e aes-256 /dev/loop0 /dev/sda1
This is a new partition, so you'll need to create a filesystem on it. The drive is now accessible via the loop0 device:
mkfs.ext3 /dev/loop0
Now you can just mount your partition through the loop0 device:
mount -t ext3 /dev/loop0 /mnt/encrypted
Use the filesystem that you mounted at /mnt/encrypted and then make sure to unmount and detach the loop device when you're done:
unmount /mnt/encrypted
losetup -d /dev/loop0
As in the CD example above, you can actually skip the losetup steps (once you've created the filesystem) and have mount automatically handle the set up and tear down of the cryptoloop device:
mount -t ext3 /dev/sda1 /mnt/encrypted -oencryption=aes-256
... do some stuff ...
umount /mnt/encrypted
gekopieerd van [1]

