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
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.
/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 (same) processor : 2 (same) processor : 3 processor : 3 (same) 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
aesfeature 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
aeshardware support despite the fact that the kernel doesn't report its availability?