1

I would like to compare openssl speed on different hardware. But I'm confused about results even on the same machine.

First I did run this command on an N4150 based board:

openssl speed -evp chacha20-poly1305 md5 sha1 sha256 sha512 des des-ede3 aes-128-cbc aes-192-cbc -evp aes-256-cbc rsa2048 dsa2048

Got this:

OpenSSL 1.1.1h  22 Sep 2020
built on: Tue Sep 22 14:59:44 2020 UTC
options:bn(64,64) rc4(16x,int) des(int) aes(partial) idea(int) blowfish(ptr) 
compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -march=x86-64 -mtune=generic -O2 -pipe    -fno-plt -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DNDEBUG -D_FORTIFY_SOURCE=2
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
md5              74910.84k   183741.71k   336840.36k   428625.51k   465734.31k   468439.93k
sha1            152672.07k   433890.13k   923643.55k  1266927.73k  1409417.22k  1427501.21k
des cbc          48470.90k    49856.36k    50494.16k    50539.52k    50804.10k    50883.55k
des ede3         17911.51k    17961.11k    18155.97k    18116.27k    18211.45k    18164.87k
aes-128 cbc      99099.39k   105838.75k   107074.01k   107668.82k   108564.55k   107970.56k
aes-192 cbc      85471.39k    90118.72k    89348.62k    91642.54k    92196.99k    92002.46k
aes-256 cbc      74369.38k    78440.71k    79380.98k    79617.02k    80161.05k    79844.69k
chacha20-poly1305   128118.24k   264553.38k   423989.93k   450431.57k   464091.87k    462258.18k
sha256           87942.09k   222286.19k   418759.42k   541132.63k   590470.59k   591265.79k
sha512           22545.55k    89217.86k   137546.57k   191838.35k   216042.15k   217923.64k
              sign    verify    sign/s verify/s
rsa 2048 bits 0.002277s 0.000066s    439.2  15144.0
              sign    verify    sign/s verify/s
dsa 2048 bits 0.000923s 0.000852s   1082.9   1173.5

I was wondering about the low aes performance, because the CPU has AES-NI support build in. So I tried to check if AES-NI is working. And yes. It's working. Did a secound openssl speed check, but only with aes.

# openssl speed -evp aes-256-cbc

The results are much higher ...

aes-256-cbc     284813.18k   526461.51k   618752.60k   655946.57k   671831.97k   668445.21k

Then I did the first check again and I found speed is low again. Hm. Ok, next try:

# openssl speed -evp aes-256-cbc aes-256-cbc

Then I got 2 different values

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-256 cbc      75641.25k    78916.19k    79252.36k    79541.09k    79914.47k    79735.47k
aes-256-cbc     284560.52k   525848.06k   618965.62k   658574.13k   670127.52k   670127.59k

So I guess my problem is issuing a correct openssl command. But I can't figure out how to do it.

Can anybody help me?

henning
  • 11
  • 1
  • 2

1 Answers1

0

From your results, you will notice one is aes-256-cbc and one is aes-256 cbc. aes-256-cbc uses EVP with hardware AES-NI, but aes-256 cbc doesn't

Eddie
  • 11
  • 2