accessMode wrong implementation in Crypto driver RTD 3.0.0_P07

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

accessMode wrong implementation in Crypto driver RTD 3.0.0_P07

跳至解决方案
1,084 次查看
ovidiubriscan
Contributor IV

Hi NXP team, we have the RTD driver 3.0.0 P07 for # S32K3 uC.

What we observed is that the Crypto driver is not correctly interpreting the mode coming from upper layers (eg. CSM), in case CRYPTO_OPERATIONMODE_STREAMSTART (which is a START and an UPDATE operation together) is passed to the Crypto driver, this does not work as expected, in one method "Crypto_Hse_OperationModeControl" is translated to CRYPTO_OPERATIONMODE_STREAMSTART==CRYPTO_OPERATIONMODE_START==CRYPTO_OPERATIONMODE_SINGLECALL and in other method "Crypto_Hse_ConfigureAccessMode" it directly translates to HSE_ACCESS_MODE_ONE_PASS (as STREAMSTART is not contemplated and goes to default processing) which is incorrect from our point of view as mode is a bit-wise mask and shall be treated as such. Please see attachment pictures also.

We think at Crypto driver level if there is a STREAMSTART mode coming shall be implemented in 2 calls (Crypto_Hse_SendMsg) towards the HSE FW one with START and one with UPDATE.

According to AR spec SWS_Crypto_00017 : ... These operations can be combined to execute multiple operations at once. Then, the operations are performed in the order “START”, “UPDATE”, “FINISH”.

Thanks a lot for supporting,

Ovidiu

0 项奖励
回复
1 解答
1,039 次查看
nxf78987
NXP Employee
NXP Employee

Hello @ovidiubriscan,

The development team confirmed this is a bug (ticket ID: SECRDR-2417). This issue will be fixed on the next releases in the future.

Best regards,

Dan

在原帖中查看解决方案

2 回复数
916 次查看
AlexBarkat
Contributor I

I appreciate you bringing up this issue with the Crypto driver for S32K3 microcontrollers. It's crucial to tackle such discrepancies to ensure the driver performs as expected. It seems there might be a misunderstanding of the mode in the Crypto driver, leading to unexpected behavior. Your idea of splitting it into two separate calls (START and UPDATE) aligns with the AR spec SWS_Crypto_00017, which outlines the order of operations. In case you're still hunting for more information, I have a suggestion. You can also try using a cryptomixer, which could help with crypto-related issues. Hopefully, the NXP team can address this problem and provide a solution to ensure the Crypto driver functions correctly, maintaining the security of crypto operations.

0 项奖励
回复
1,040 次查看
nxf78987
NXP Employee
NXP Employee

Hello @ovidiubriscan,

The development team confirmed this is a bug (ticket ID: SECRDR-2417). This issue will be fixed on the next releases in the future.

Best regards,

Dan