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
Solved! Go to Solution.
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
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.
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