cancel
Showing results for 
Search instead for 
Did you mean: 

OpenSSL performance expectation

CErik.2
Associate II

I am wondering what number I should expect in terms of encryption performance with STM32MP157C. Below is that I get

OpenSSL 1.1.1l  24 Aug 2021
# openssl engine -c
(devcrypto) /dev/crypto engine
 [DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC, AES-128-CTR, AES-192-CTR, AES-256-CTR, AES-128-ECB, AES-192-ECB, AES-256-ECB, MD5, SHA1, SHA224, SHA256, SHA384, SHA512]
(dynamic) Dynamic engine loading support
 
## without devcrypto
openssl speed -evp aes-128-cbc -engine devcrypto -elapsed
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       7533.57k     9109.38k     9611.86k     9747.11k     9786.71k     9781.25k
 
## with devcrypto
openssl speed -evp aes-128-cbc  -elapsed
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-128-cbc       1898.27k     5383.32k     9960.87k    12648.11k    13443.07k    13538.65k

Are these numbers to be expected?

1 ACCEPTED SOLUTION

Accepted Solutions
Olivier GALLIEN
ST Employee

Hi @Community member​ ,

It is known linux issue that crypto-dev framework is not optimised for HW engines.

The result is better performance in Full SW than with HW accelerated framework for the crypto functions that require many cyclic operation on small size data (linked to key size):

- Linux framework is using work queues that will extend scheduling usage

- dma use will not help (more time to configure than copy)

This is the same issue for any vendor.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Olivier GALLIEN
ST Employee

Hi @Community member​ ,

It is known linux issue that crypto-dev framework is not optimised for HW engines.

The result is better performance in Full SW than with HW accelerated framework for the crypto functions that require many cyclic operation on small size data (linked to key size):

- Linux framework is using work queues that will extend scheduling usage

- dma use will not help (more time to configure than copy)

This is the same issue for any vendor.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thanks!

I just wanted to confirm that I was not completely off.

OpenSSL 1.1.1l  24 Aug 2021
 
# openssl speed -evp aes-128-cbc  -elapsed
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-128-cbc      11780.60k    14843.43k    15925.76k    16219.14k    16299.35k    16285.70k
 

157A at 650MHz, 16bit DDR3L on custom rootfs

No HW crypto