Can hw acceleration work Openssl 3.0.5 and CAAM through /dev/crypto

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can hw acceleration work Openssl 3.0.5 and CAAM through /dev/crypto

94 Views
LaserDolphin
Contributor I

I am using a custom board with an ls1023adtu processor ?
We want to use hw accelerated crypto to speed up applications as ssh , scp and sftp.

The board uses a custom linux distribution built with yocto that includes relevant parts of the
layerscape SDK:

cat /proc/crypto shows

cat /proc/crypto
name : tls10(hmac(sha1),cbc(aes))
driver : tls10-hmac-sha1-cbc-aes-caam-qi
module : kernel
priority : 2000
refcnt : 1
selftest : passed
internal : no
type : aead
async : yes
blocksize : 16
ivsize : 16
maxauthsize : 20
geniv : <none>

...

 

This leads me to believe tha the CAAM drivers for HW acceleration  have been installed correctly.

I then build and installl  openssl 3.0.5.

The  cryptodev.ko module is built ok and can be loaded with insmod but not with modprobe.

The  /dev/crypto device does not show when running "openssl" engine and no access of
/dev/crypto is shown with strace.

In the source code for openssl 3.0.5, the /dev/crypto device is accessed in file e_devcrypto.c.

The device is used differently depending on whether  NO_DYNAMIC_ENGINE is defined or not.
If defined  the crypto device is opened in function "engine_load_devcrypto". Otherwise
this happens in a function name "bind_helper"
I have tried  different settings for NO_DYNAMIC_ENGINE and other flags but no success yet.

My questions are:
1.     Is hardware crypto support working with openssl 3.0.5 supported ? , i,e worthwhile trying to
       make it work. ?
2.    I have read the recommended documentation  in LSKUG 21.08 but they are for version 1.1.1.
       Are there any newer documents ?

//Jan A





1 Reply

59 Views
Hector_Villarruel
NXP TechSupport
NXP TechSupport

Hello @LaserDolphin 

Hope this post finds you well,

Regarding your questions:

1. Is hardware crypto support working with openssl 3.0.5 supported ? , i,e worthwhile trying to
make it work. ?
2. I have read the recommended documentation in LSKUG 21.08 but they are for version 1.1.1.
Are there any newer documents ?

A1) It is supported the version 3.0.2, nevertheless I recommend you to test it on version 3.0.5.

I also would like to recommend the following NXP community link:

https://community.nxp.com/t5/Layerscape/Hardware-offloading-with-OpenSSL-3-0-2/td-p/1497900

A2) Yes, they are. (Layerscape Linux Distribution POC User Guide, UG10081 )

Please find it at the following link:

https://www.nxp.com/docs/en/user-guide/UG10081_LLDP_6.1.55_2.2.0.pdf

https://www.nxp.com/docs/en/user-guide/LLDPUG_RevL6.1.1-1.0.0.pdf

https://www.nxp.com/design/design-center/software/embedded-software/linux-software-and-development-t...

Have a great day.

BR,

Hector V

0 Kudos
Reply