As I understand it, all ARM processors based on the 32/64-bit ARMv8-A architecture (and more recent iterations) support hardware-accelerated AES instructions.

Under Linux, the feature flags in /proc/cpuinfo are supposed to include aes for ARM processors which support these instruction (also pmull{2}, sha1, sha2 for other hardware crypto accelerations).

Many devices with ARMv8-A CPUs are nevertheless built with only 32-bit kernels and userspace, for example the very common Qualcomm MSM8916 / Snapdragon 410 platform.

I inspected /proc/cpuinfo on a rooted MSM8916-based Android device, and to my surprise the CPU is identified as ARMv7 — not ARMv8 — and the aes feature is not included:

# cat /proc/cpuinfo
processor   : 0
model name  : ARMv7 Processor rev 0 (v7l)
BogoMIPS    : 38.00
Features    : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 evtstrm 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 0

processor   : 1

processor   : 2
(same)    processor : 3

processor   : 3

Hardware    : Qualcomm Technologies, Inc MSM8916
Revision    : 81b0
Serial      : 01d8fa2100000000
Processor   : ARMv7 Processor rev 0 (v7l)
Device      : harpia
Radio       : US
MSM Hardware    : MSM8916


  • Is the kernel's lack of awareness of the aes feature bit a mistake, or limitation in the way that the kernel for this device has been built?
  • Is AES hardware acceleration truly not available when running on an ARMv8-A CPU running a kernel built for ARMv7?
  • Is it possible for userspace libraries or applications to take advantage of aes hardware support despite the fact that the kernel doesn't report its availability?
  • 2
    $\begingroup$ My guess it is a limitation of the kernel, just not knowing about ARMv8. The AES acceleration is provided by CPU instructions, so I presume it will be available none-the-less. cpuinfo shows the information by parsing the flags (that it knows of), I would recommend that you request and parse the flags yourself rather than relying on the kernel / cpuinfo. $\endgroup$ – Maarten Bodewes Aug 20 '18 at 3:36
  • 1
    $\begingroup$ Note that AES support is optional for ARMv8-A according to the ARM docs, but the MSM8916 410 SoC should support them. $\endgroup$ – Maarten Bodewes Aug 20 '18 at 3:44
  • 4
    $\begingroup$ This article describes how to get the CPU flags in a portable way. I can confirm that you should be able to use AES instructions in 32-bit mode if the CPU does supports it. $\endgroup$ – Conrado Aug 20 '18 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.