Aes-xts-plain64 fails on Kernel 5.4.1
Issue description
This is on intel x86_64 CPU, kernel running inside a VM, but without AES-NI.
Benchmark output shows the following:
> # Tests are approximate using memory only (no storage IO).
> PBKDF2-sha1 1126290 iterations per second
> PBKDF2-sha256 751128 iterations per second
> PBKDF2-sha512 512000 iterations per second
> PBKDF2-ripemd160 670445 iterations per second
> PBKDF2-whirlpool 246375 iterations per second
> # Algorithm | Key | Encryption | Decryption
> aes-cbc 128b 108.0 MiB/s 64.5 MiB/s
> serpent-cbc 128b 83.3 MiB/s 99.0 MiB/s
> twofish-cbc 128b 157.8 MiB/s 173.0 MiB/s
> aes-cbc 256b 81.1 MiB/s 48.3 MiB/s
> serpent-cbc 256b 82.9 MiB/s 98.5 MiB/s
> twofish-cbc 256b 156.8 MiB/s 171.7 MiB/s
> aes-xts 256b N/A N/A
> serpent-xts 256b N/A N/A
> twofish-xts 256b N/A N/A
> aes-xts 512b N/A N/A
> serpent-xts 512b N/A N/A
> twofish-xts 512b N/A N/A
Steps for reproducing the issue
Additional info
Kernel 5.4.1
zcat /proc/config.gz |grep aes shows the following:
CONFIG_INITRAMFS_AES=y
CONFIG_CRYPTO_AEGIS128_AESNI_SSE2=m
CONFIG_CRYPTO_LIB_AES=y
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_AES_TI=m
CONFIG_CRYPTO_AES_NI_INTEL=y
CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64=m
CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64=m
But, ECB and XTS are not found in /proc/crypto:
name : cbc(aes)
driver : cbc(aes-fixed-time)
name : aes
driver : aes-fixed-time
module : aes_ti
name : aes
driver : aes-generic
Note : With AES-NI enabled, all of this works as expected. On CPUs without AES-NI support, the failure as above is seen.
Debug log
Output with --debug option:
Edited by Milan Broz