How to know if the SoC supports ARMv8 crypto Cryptographic Extension

Hi,

Does anyone know if there is a common way to check if the SoC supports ARMv8 crypto Cryptographic Extension if we can not find such information in the SoC document. For now, the SoC I want to know
are IPQ60xx and IPQ50xx.

Hi,
It's easy to check

cat /proc/cpuinfo
processor	: 0
Processor	: AArch64 Processor rev 4 (aarch64)
Hardware	: sun50iw1p1
BogoMIPS	: 48.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4
...

aes pmull sha1 sha2 - Means the CPU supports ARM Crypto extension.

On my TODO list is the addition of optised modules for ARM CE enabled targets.

2 Likes

In fact, I noted /proc/cpuinfo and saw "aes pmullsha1 sha2 " in IPQ50xx and IPQ60xx before I posted, but I'm confused because I am sure in my targets IPQ60xx and IPQ50xx, there is another crypto engine in the NSS(network sub system) . So it's duplicate if they also support ARM Crypto extension.

So you have not benefited the ARM CE yet in your this target? This patch https://github.com/coolsnowwolf/lede/commit/ef449e470b4eb46cff376efefe35b4c05251d3b1 FYI. I plan to have a try.

ARM CE is part of the core and is faster for small blocks of data but is CPU intensive. The NSS is a separate block and can perform with zero overhead on the CPU. On many architectures, both cryptographic blocks coexist. See the performance comparison for the Xilinx Zynq [1]. With ARM CE, CPU can encrypt traffic with AES up to 2 GBps per core.

[1] https://www.xilinx.com/support/documentation/white_papers/wp512-accel-crypto.pdf

1 Like

Yes. I confirmed IPQ5018 also supports ARMv8 crypto extension.
before enable it:

root@OpenWrt:/# ./benchmark aes_gcm

  AES-GCM-128              :      13318 KiB/s,          0 cycles/byte
  AES-GCM-192              :      12604 KiB/s,          0 cycles/byte
  AES-GCM-256              :      11959 KiB/s,          0 cycles/byte

after enable it

root@OpenWrt:/# ./benchmark aes_gcm

  AES-GCM-128              :      36681 KiB/s,          0 cycles/byte
  AES-GCM-192              :      34992 KiB/s,          0 cycles/byte
  AES-GCM-256              :      34068 KiB/s,          0 cycles/byte