Linux - how to find the LUKS1 or LUKS2 encryption version? How to use LUKS 2?
Hello, I use the PC encryption of the whole Ubuntu partition using LUKS and I also have LUKS on data partition. How do I find out what version of LUKS I have there? LUKS 1 or LUKS 2?
When there is LUKS version 1, I understand that I will not redo it in the system partition, but could it be redesigned on that data partition to LUKS version 2?
Thanks
Hello,
how to verify version LUKS1 and LUKS2? You can use cryptsetup luksDump to do this:
Here is the LUKS version 2
Here is the LUKS version 1
-----------------------------------------------------------------------------
Enforcing LUKS 2 should never be necessary - LUKS 2 is automatically selected when creating an encrypted partition (unless you have a very old cryptsetup package). However, if you want to force older LUKS 1 for some reason, you would do it this way:
When there is LUKS version 1, I understand that I will not redo it in the system partition, but could it be redesigned on that data partition to LUKS version 2?
Thanks
REPLY
Hello,
how to verify version LUKS1 and LUKS2? You can use cryptsetup luksDump to do this:
Here is the LUKS version 2
cryptsetup luksDump /dev/xvda1
LUKS header information
Version: 2
Here is the LUKS version 1
cryptsetup luksDump /dev/md0
LUKS header information for /dev/md0
Version: 1
Cipher name: aes
Cipher mode: xts-plain64
Hash spec: sha1
Payload offset: 4096
-----------------------------------------------------------------------------
Enforcing LUKS 2 should never be necessary - LUKS 2 is automatically selected when creating an encrypted partition (unless you have a very old cryptsetup package). However, if you want to force older LUKS 1 for some reason, you would do it this way:
cryptsetup -y -v luksFormat --type=luks1 -c aes-xts-plain64 -s 512 /dev/sdf3