Category: LUKS

Encryption, LUKS

Encrypting a second hard drive

Open GParted and delete all partitions on the disk you want to encrypt Encrypt the partition sudo cryptsetup -y -v luksFormat /dev/sdasudo cryptsetup -y -v luksFormat /dev/sda Decrypt the new partition so that you can format it with ext4 sudo cryptsetup luksOpen /dev/sda sda_crypt sudo mkfs.ext4 /dev/mapper/sda_cryptsudo cryptsetup luksOpen /dev/sda sda_crypt sudo mkfs.ext4 /dev/mapper/sda_crypt Mount …

Encryption, LUKS

Create an encrypted file container in Linux

Installations sudo apt-get install cryptsetupsudo apt-get install cryptsetup Create an empty file with the size of your container (e.g. 100MB) fallocate -l 100M mycontainer.imgfallocate -l 100M mycontainer.img or dd if=/dev/urandom of=mycontainer.img bs=1M count=100dd if=/dev/urandom of=mycontainer.img bs=1M count=100 Using a keyfile dd if=/dev/urandom of=mykey.key bs=1024 count=1dd if=/dev/urandom of=mykey.key bs=1024 count=1 Encrypting disk image file sudo cryptsetup …