How to determine what encryption is being used a LUKS partition?

595

Solution 1

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
[...]

Solution 2

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
Share:
595

Related videos on Youtube

learning
Author by

learning

Updated on September 18, 2022

Comments

  • learning
    learning over 1 year

    The parsedate function is not working in the following: fiddle here

    I am using jquery 1.10.2

    What is wrong with the following?

    <script>
        $(document).ready(function() {
            var date = new Date();
            $('#date1').text($.datepicker.parseDate('ymmdd', date));
        });
    </script> 
    <html>
        <body>
            First date: <span id="date1"></span>
        </body>
    </html>
    
    • Dhaval Marthak
      Dhaval Marthak over 9 years
      First include jQuery UI library to your fiddle and see this may help you!
    • learning
      learning over 9 years
      @Dhaval it does not help
  • learning
    learning over 9 years
    I am having the error throw "Missing number at position " + iValue;
  • learning
    learning over 9 years
    thank you , what I need to do is to compare dates... I can`t use this to compare 100 dates.. Why is dateparse not working
  • Kenny
    Kenny over 9 years
    you cant use parseDate like this rather you can use parseDate like $.datepicker.parseDate('yyMMdd', '2014september06');
  • akhan
    akhan over 5 years
    Why two different tools for the same task: dmsetup is a lower level tool then cryptsetup.
  • Hauke Laging
    Hauke Laging over 5 years
    @akhan That's just what I am used to. But cryptsetup status crypto can be used, too.
  • goulashsoup
    goulashsoup about 2 years
    As far as i understand, when using cryptsetup status <partition>, the <partition>s that give info can be identified by the type crypt when using lsblk (without options).