What command can be used to determine the used encryption on a LUKS partition (all the relevant information, initialization vector, generation scheme, mode of operation and block cipher primitive)?


If the decrypted volume is /dev/mapper/crypto then you can get the information with

dmsetup table crypto
0 104853504 crypt aes-cbc-essiv:sha256 000[...]000 0 254:2 4096

If the encrypted volume is /dev/storage2/crypto then you get the information with

cryptsetup luksDump /dev/storage2/crypto
LUKS header information for /dev/storage2/crypto

Version:        1
Cipher name:    aes
Cipher mode:    cbc-essiv:sha256
Hash spec:      sha256
  • Why two different tools for the same task: dmsetup is a lower level tool then cryptsetup. – akhan Dec 5 '18 at 19:49
  • 5
    @akhan That's just what I am used to. But cryptsetup status crypto can be used, too. – Hauke Laging Dec 7 '18 at 21:28

List the disks:

lsblk --fs

Then (used encryption):

cryptsetup luksDump /dev/sdb1

Or (used encryption):

cryptsetup status crypt_sdb1 

In addition (kernel supported encryption and bench):

cat /proc/crypto
ls /lib/modules/$(uname -r)/kernel/crypto/

#cryptsetup benchmark --cipher aes-xts --key-size 256 
cryptsetup benchmark

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.