Skip to main 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

cryptsetup luksAddKey /dev/sdX2

Remove encryption key

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

cryptsetup luksRemoveKey /dev/sdX2