Unable to use Bluefield's PKA engine on Bluefield-2 SmartNIC(P/N MBF2H516A-CEEOT)

(1)ecpu linux version:

Linux localhost.localdomain 5.4.44-mlnx.9.gdffcb36f52b7 #1 SMP PREEMPT Tue Jul 7 02:43:36 IDT 2020 aarch64 aarch64 aarch64 GNU/Linux

(2)pka driver infomation:

root@localhost:/usr/local/lib# lsmod | grep pka

pka_mlxbf 77824 0

(I’m not sure why vfio is missing, I have used “modprobe vfio”)

(3)pka lib/openssl engine lib

I compile from https://github.com/Mellanox/pka master

generate libPKA.so and libbfengine.so

(4)When I test with the openssl engine

openssl dgst -engine pka -sha256 -sign ./private.key -out 1.sign 1.txt

the output:

engine “pka” set.

PKA_USER: pka_get_rand_bytes: error: Error(-1) getting random number.

PKA_USER: pka_get_rand_bytes: error: Error(-1) getting random number.

PKA_USER: pka_get_rand_bytes: error: Error(-1) getting random number.

PKA_USER: pka_get_rand_bytes: error: Error(-1) getting random number.

PKA_USER: pka_get_rand_bytes: error: Error(-1) getting random number.

PKA_USER: pka_get_rand_bytes: error: Error(-1) getting random number.

PKA_USER: pka_get_rand_bytes: error: Error(-1) getting random number.

PKA_USER: pka_get_rand_bytes: error: Error(-1) getting random number.

Error Signing Data

281473214142944:error:04088003:rsa routines:RSA_setup_blinding:BN lib:…/crypto/rsa/rsa_crpt.c:155:

281473214142944:error:04066044:rsa routines:rsa_ossl_private_encrypt:internal error:…/crypto/rsa/rsa_ossl.c:297:

please help me!

DPU is commercial support, the pka driver is not public. Please contact sales to get it.