Setting Crypto_KeyElementSet twice in a row will return an error

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

Setting Crypto_KeyElementSet twice in a row will return an error

293 Views
ygrssm
Contributor I

After setting crypto through S32DS and copying the Crypto_SymmetricPrimitives_S32K312 source code for testing, it was found that Crypto_KeyElementSet returns an error on the second setting. How can this issue be resolved? However, there is no such problem when using the demo routine.

Tags (1)
0 Kudos
Reply
3 Replies

278 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @ygrssm 

Do you mean that the same key is imported again? There's a difference if a key is imported first time and then updated second time. If a key slot is empty, key encryption and authentication is optional. If a key slot is not empty, authentication is mandatory and encryption is optional based on user rights. You can take a look at Table 47 and 48 in HSE firmware reference manual v2.5. Also the key counter needs to be increased. 

It is rather complicated operation, so the recommendation is to erase such key if possible and then import new key to empty slot. 

Regards,

Lukas

0 Kudos
Reply

260 Views
ygrssm
Contributor I

Thank you for your reply. but,What is the full name of the HSE firmware reference manual? Is it S32K3X2_HSE_Service_API_Reference_Manual.pdf? 

Tags (1)
0 Kudos
Reply

235 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

It can be downloaded from https://www.nxp.com/products/S32K3

Documentation -> Secure files

lukaszadrapa_0-1751258634519.png

 

Search for "RM00286 HSE-B Firmware Reference Manual - V2.5"

Regards,

Lukas

0 Kudos
Reply