
So, the answer to my original question is yes, there is acceleration for AES on the RPi3's ARMv8, but much less than one might expect from a Intel/AMD proc with true crypto acceleration. To see if this has any real impact on crypto performance, I ran a few openssl speed benchmarks with and without the EVP functions and observed a ~25% performance increase with the -evp flag set I am assuming that this is enabling NEON/SIMD support, but that's conjecture on my part. The ability for the RPi3 to accelerate AES via NEON is also described at length here ().

However, there is some good news! The RPi3 does offer some modest crypto acceleration by way of sort -u /proc/crypto | grep module () This is consistent with the output of cat /proc/cpuinfo that I reported earlier. Can anyone confirm that AES instructions are supported in 18.04.2 on arm64 - or advise me as to how I might confirm that they're in use? Thank you!Īfter some sleuthing, I discovered the answer to my question: while some ARMv8 processors include optional cryptography acceleration for AES and SHAx, the Raspberry Pi 3 does not. I'm used to seeing "aes" as a flag when I run that same command on my 圆4 machines, although I'm new to ARM and realize that there may be differences. I assumed that the 64-bit Ubuntu Server image would be able to access these instructions, but AES doesn't appear as a feature in my cat /proc/cpuinfo processor : 0 One of my primary reasons for using the arm64 image was because ARMv8 processors include dedicated instructions for AES and other encryption protocols (see here () and here ()). Linux ubuntu 4.15.0-1032-raspi2 #34-Ubuntu SMP PREEMPT Wed Feb 6 11:46: aarch64 aarch64 aarch64 GNU/Linux If OpenSSL cannot leverage AES-NI for any reason, two outputs would show the same performance.Hello! I recently installed Ubuntu 18.04.2 Server on my Raspberry Pi 3 B+ using the official image (see here ()) and have confirmed that the 64-bit kernel is uname -a This confirms that AES-NI is enabled for OpenSSL. You can see that AES speed with AES-NI acceleration is about five times higher than non-acceleration. The above two example outputs show encryption rates for different block sizes. To measure AES algorithm speed with AES-NI acceleration (via EVP APIs): $ openssl speed -elapsed -evp aes-128-cbc To measure AES algorithm speed without AES-NI acceleration: $ openssl speed -elapsed aes-128-cbc If AES-NI is available for OpenSSL, you will see significant performance boost when EVP functions are used. Thus you can compare AES performance with or without EVP functions. grep -o aes /proc/cpuinfo aes aes aes aes. When EVP APIs are called, they can automatically detect the presence of AES-NI and accelerate AES encryption computations using AES instruction sets. It is recommended to use CPUs designed to support Advanced Encryption Standard Instruction Set (or the Intel. To check whether OpenSSL can leverage AES instruction sets, you can use OpenSSL's EVP APIs. If the output shows aes, that means AES-NI engine is available on current CPUs. For this you can inspect CPU flags as follows. Check if AES-NI is Available on CPU Processorsīefore proceeding, first verify that current CPUs have the AES instruction set. If you want to check whether currently installed OpenSSL supports AES-NI hardware acceleration, you can test using OpenSSL's EVP APIs.
CPUINFO AES INSTRUCTIONS SOFTWARE
To support available hardware extensions, OpenSSL provides so-called EVP crypto APIs (e.g., EVP_Decrypt/EVP_Encrypt) which can automatically leverage hardware acceleration like AES-NI (if available) and fall back to software implementation (if not available), via a single interface. OpenSSL crypto library supports AES-based ciphers as well.

AES-based symmetric encryption is widely used in a variety of security applications and protocol implementations (e.g., IPSec, SSL/TLS, HTTPS, SSH). Intel Advanced Encryption Standard New Instructions (AES-NI) is a special instruction set for x86 processors, which is designed to accelerate the execution of AES algorithms. I would like to check whether currently installed OpenSSL can use AES-NI acceleration.

Question: I have a Linux server which has Intel AES-NI hardware capability.
