I am using official 22.03 R2S image and opkg to install openssl. Why is the gcm performance so worse comparing with cbc? Does the R2S use the armv8 crypto extensions to optimize the cbc speed in openssl? @SvenH and @jayanta525, any idea? Thanks
oot@OpenWrt:/# openssl speed -evp aes-128-cbc -elapsed
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-128-cbc for 3s on 16 size blocks: 17670608 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 13704145 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 7113068 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 2496547 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 354119 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 16384 size blocks: 178708 aes-128-cbc's in 3.00s
OpenSSL 1.1.1q 5 Jul 2022
built on: Thu Oct 13 13:10:56 2022 UTC
options:bn(64,64) rc4(char) des(int) aes(partial) blowfish(ptr)
compiler: aarch64-openwrt-linux-musl-gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result T
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
aes-128-cbc 94243.24k 292355.09k 606981.80k 852154.71k 966980.95k 975983.96k
root@OpenWrt:/# openssl speed -evp aes-128-gcm -elapsed
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-128-gcm for 3s on 16 size blocks: 6591430 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 64 size blocks: 2176086 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 256 size blocks: 602401 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 1024 size blocks: 155371 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 8192 size blocks: 19669 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 16384 size blocks: 9840 aes-128-gcm's in 3.00s
OpenSSL 1.1.1q 5 Jul 2022
built on: Thu Oct 13 13:10:56 2022 UTC
options:bn(64,64) rc4(char) des(int) aes(partial) blowfish(ptr)
compiler: aarch64-openwrt-linux-musl-gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result T
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
aes-128-gcm 35154.29k 46423.17k 51404.89k 53033.30k 53709.48k 53739.52k