https://github.com/raspberrypi/linux/issues/3648

jfikar commented on Jun 15, 2020

I'm running custom arm64 kernel 5.4.45 with Adiantum enabled.

CONFIG_CRYPTO_ADIANTUM=m
CRYPTO_NHPOLY1305_NEON=m

The speed on RPi4 is

cryptsetup benchmark -c xchacha20,aes-adiantum
# Tests are approximate using memory only (no storage IO).
#            Algorithm |       Key |      Encryption |      Decryption
xchacha20,aes-adiantum        256b       211.1 MiB/s       214.1 MiB/s


cryptsetup benchmark -c xchacha12,aes-adiantum
# Tests are approximate using memory only (no storage IO).
#            Algorithm |       Key |      Encryption |      Decryption
xchacha12,aes-adiantum        256b       256.6 MiB/s       258.2 MiB/s

While AES gives only

cryptsetup benchmark -c aes-xts -s 256
# Tests are approximate using memory only (no storage IO).
# Algorithm |       Key |      Encryption |      Decryption
    aes-xts        256b        71.0 MiB/s        60.6 MiB/s


Please, enable also the second option I mentioned CRYPTO_NHPOLY1305_NEON, without it the speed is only

cryptsetup benchmark -c xchacha20,aes-adiantum
# Tests are approximate using memory only (no storage IO).
#            Algorithm |       Key |      Encryption |      Decryption
xchacha20,aes-adiantum        256b       127.4 MiB/s       128.6 MiB/s

cryptsetup benchmark -c xchacha12,aes-adiantum
# Tests are approximate using memory only (no storage IO).
#            Algorithm |       Key |      Encryption |      Decryption
xchacha12,aes-adiantum        256b       160.9 MiB/s       160.9 MiB/s