imx6ul: RSA 2048 bit key generation in CAAM acceleration

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx6ul: RSA 2048 bit key generation in CAAM acceleration

ソリューションへジャンプ
896件の閲覧回数
juan_tang
Contributor III

HI sir,

Platform:imx6ul

BSP:L4.1.15_ 2.0.0_ GA's patch

Function:RSA 2048 bit key generation in CAAM acceleration

Need support: 

I refer to the three patches in the link below,

#Enhance cryptodev and its engine in OpenSSL by CAA... - NXP Community

微信图片_20230505105930.png

then RSA acceleration, found that the generated key is invalid. checking the code, I feel like In function cryptodev_bn_miller_rabin( ) ,The return value judgment of the function cryptodev_bn_check_small_factors( ) is not comprehensive and may result in misjudgment. After trying to make the corrections, the key generated is normal, but the speed is slower than that of OpenSSL pure software. How fast can I generate 2048bit keys by using RSA hardware acceleration normally? Is there an optimized version of this patch?

ラベル(3)
0 件の賞賛
返信
1 解決策
879件の閲覧回数
kef2
Senior Contributor V
  • he return value judgment of the function cryptodev_bn_check_small_factors( ) is not comprehensive and may result in misjudgment. After trying to make the corrections, the key generated is normal,

Could you provide your variant, please? 

  • but the speed is slower than that of OpenSSL pure software.

Hashes and encryption are as well slower for smaller data blocks, yet it still offloads CPU and CPU can do other tasks while waiting for crypto result. If you generate just few RSA keys, it may have no sense to use CAAM for RSA, it depends on app.

元の投稿で解決策を見る

3 返答(返信)
845件の閲覧回数
Harvey021
NXP TechSupport
NXP TechSupport

Hi @juan_tang 

Use cryptodev, mainly offload CPU at present. The performance is not as good as the CPU.

 

Best regards

Harvey

834件の閲覧回数
juan_tang
Contributor III

Got it ,thanks for your support

0 件の賞賛
返信
880件の閲覧回数
kef2
Senior Contributor V
  • he return value judgment of the function cryptodev_bn_check_small_factors( ) is not comprehensive and may result in misjudgment. After trying to make the corrections, the key generated is normal,

Could you provide your variant, please? 

  • but the speed is slower than that of OpenSSL pure software.

Hashes and encryption are as well slower for smaller data blocks, yet it still offloads CPU and CPU can do other tasks while waiting for crypto result. If you generate just few RSA keys, it may have no sense to use CAAM for RSA, it depends on app.