Is it possible to hardware accelerate LUKS encryption?

11,973

Solution 1

Beginning with Kernel 2.6.32 the AES-NI instructions on newer Intel processors are supported by dm-crypt. You might want to check /proc/cpuinfo if your processor supports these instructions. Otherwise, upgrading your processor will speed up your harddisk encryption (provided you are actually using AES encryption)

More info: http://en.wikipedia.org/wiki/AES_instruction_set

Solution 2

AESNI is hardware acceleration for AES encryption. As long as your LUKS/dmcrypt is setup to use AES, which it most likely is, and so long that your processor supports it, you can add the AESNI kernel module manually or automatically.

Manual (test to make sure it works/is supported)

  • sudo modprobe aesni-intel

Automatic

  • sudo vim /etc/initramfs-tools/modules
    • Add aesni_intel
  • sudo update-initramfs -u

You want to add it to your initramfs, and not just your normal kernel because you want it to be available before you decrypt your drive and load your main kernel.

Share:
11,973

Related videos on Youtube

Glendyr
Author by

Glendyr

Updated on September 18, 2022

Comments

  • Glendyr
    Glendyr over 1 year

    My Linux server spends a lot of time computing LUKS encryption. Is there any way to hardware accelerate it (with a PCI express card for example)?

  • Coops
    Coops almost 13 years
    Interesting - what you got and docs/links on the subject?
  • earthmeLon
    earthmeLon over 11 years
    modprobe aesni-intel or add it to /etc/initramfs-tools/modules and run update-initramfs -u.
  • earthmeLon
    earthmeLon about 11 years
    Note Most (if not all) Intel i3's do not support AESNI. You can check by looking for "aes" in /proc/cpuinfo: grep aes /proc/cpuinfo.
  • Suici Doga
    Suici Doga almost 8 years
    Does this work for AMD processors which support AES ? I ran the command @earthmeLon says and it says my AMD A8-4500M supports AES