Skip to content

LUKS - Encryption

Summary of basic commands

Create encrypted partition
cryptsetup -c aes-xts-plain64 -s 512 -h sha512 luksFormat /dev/sdX2
Open encrypted partition as crypted\_sdX2
cryptsetup luksOpen /dev/sdX2 crypted_sdX2
Add encryption key
foo@bar:~$cryptsetup luksAddKey /dev/sdX2

Attention !!!

When you don’t have antoher key, you aren’t able to decrypt the partition afterwards

Remove encryption key
cryptsetup luksRemoveKey /dev/sdX2