2

Ubuntu documentation says that an aes kernel module needs to be enabled for using aes and dm-crypt with LUKS but when I run modprobe aes as the documentation says to, I get ERROR: could not insert 'padlock_aes': No such device. The documentation considers this error saying that it can be a sign that my system "does not have a hardware cryptographic device." But I have a modern i7 CPU and grep aes /proc/cpuinfo reveals the aes flag.

If I ignore the kernel module command and continue along with cryptsetup everything seems to work correctly. This is even with ignoring the Ubuntu documentation's remedy for the error of alias aes aes_generic.

In comparison. The Arch Linux guide on performing the same task does not include the kernel module loading step (see under the heading "Formatting LUKS Partitions").

Given that cryptsetup works even if I throw the Ubuntu documentation's advice to the wind and that the Arch guide doesn't even mention what the Ubuntu documentation did I am getting the feeling that perhaps the aes module is preloaded in newer kernels perhaps?

I expect that I will have hardware level aes support with the hardware that I own.

1 Answer 1

5

From the ubuntu guide you referenced:

If the following error messages appear when loading sha256 and aes:

sudo modprobe sha256
WARNING: Error inserting padlock_sha (/lib/modules/2.6.24-21-generic/kernel/drivers/crypto/padlock-sha.ko): No such device

sudo modprobe aes
WARNING: Error inserting padlock_aes (/lib/modules/2.6.24-21-generic/kernel/drivers/crypto/padlock-aes.ko): No such device

it is an indication that the system does not have a hardware cryptographic device (source: Ubuntu Bug #206129)

The workaround is to add the following lines (using your favourite editor) to the bottom of /etc/modprobe.d/aliases and re-run the modprobe commands for the sha256 and aes kernel modules:

alias sha256 sha256_generic
alias aes aes_generic

When utilising Gnome to mount the encrypted filesystems, it is not required to manually load the kernel modules.

See also : https://bugs.launchpad.net/ubuntu/+source/linux/+bug/206129

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .