
#Loopback device free
It may vary depending on which is the next free available card number.

The loop device is still attached to your partition.In the above images, the card 2 is the loopback card. After you are done playing, unmount the filesystem: umount /mnt/cryptoĭetach the loop device. You can now play with your encrypted file system until you are bored. At this stage you need to tell mount explicitly which loop device to use: mount -t ext3 /dev/loop0 /mnt/crypto First you need to create a mount point, such as /mnt/crypto: mkdir /mnt/crypto The following creates an ext3 file system using the loop device: mkfs.ext3 /dev/loop0 You can chose whatever file system you like. Older and unpatched version use aĭifferent way of passing the key size, and do not work with the 2.6 Crypto API.Ĭreate a file system.

#Loopback device how to
Make sure you have followed the instructions above on how to install a patched version of util-linux. If losetup fails with an INVALID ARGUMENT error message, there is a problem with your util-linux package. AES may be a strong algorithm, but if you chose a weak password, that security goes down the drain.
#Loopback device password
Sure you select a strong password from the start. The most straight-forward way of changing the password is to create a new encrypted partition or file and move all data into it. Since the password is hashed to create the encryption key, it is not easy to change the password later on. There is one big downside to using Cryptoloop. Select a strong password and try to remember it without having to stick a Post-It note to your monitor. The following command creates an encrypted filesystem using the loop device 0 using the AES cipher with a 256-bit key on the device /dev/sda1: losetup -e aes-256 /dev/loop0 /dev/sda1 This is done using the losetup command from the util-linux package. I recommend that you use AES with a 256-bit key. A list of ciphers supported by your kernel can be obtained from /proc/crypto. You may get an error message that the device is full. If you do make a mistake, you can easily overwrite the wrong partition with random garbage!įilling a partition with random data can be done as follows: dd if=/dev/urandom of=/dev/sda1 bs=1M This will make it harder for an attacker to detect patterns in your encrypted partition.īe careful what you type here for your partition. It is recommended that you format your partition and fill it with random data before you create the encrypted file system on it. Secure and faster, so there is really no reason to use Triple-DES anymore.

Triple-DES may be an option, but AES is probably more Stay away from DES, it is both slow and weak. However, Serpent is also slower than AES. Serpent has not been analyzed as much, but isĬonsidered to be even a little bit stronger than AES. AES has been cryptanalyzed a lotĪnd no serious weaknesses have been discovered so far. Both AES and Serpent are probably a reasonable choice. An excellent resource, discussing theĭifferent cryptographic algorithms, are Bruce Schneier's books, Applied Cryptography and PracticalĬryptography. Your currently running kernel by looking into /proc/crypto. You can get a list of the algorithms supported by You like that has been enabled in the kernel. I have chosen to use AES as a cipher, but you can substitute any cipher

This partition can be any partition you like the followingĮxample uses /dev/sda1. Cryptoloop can be used either on a file or an entire file system.
