S32K116 csecCMD_GET_STATUS

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

S32K116 csecCMD_GET_STATUS

Jump to solution
1,120 Views
xiaoweix
Contributor III

CSEc有什么硬件标志可以读到这个密钥槽已经加载过密钥了?现在想通过读一个硬件标志来判断已经加载过授权key或者key8了,就不在加载了, CMD_GET_STATUS这个命令可以实现吗?

0 Kudos
Reply
1 Solution
1,090 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @xiaoweix 

It’s up to user to track the keys. There’s no flag which would inform you if a key is loaded or not. And because Memory Update Protocol must be followed to import or update a key, it not possible to “load a key again”. There’s a counter for each key which must be incremented if you want to update a key.

If you try to load the same key again (I mean with the same counter, so M1-M3 values are the same) then the key update won’t be successful and you will get error ERC_KEY_UPDATE_ERROR.

There’s one workaround to check if a key slot is still empty or if it is already loaded. You can try to perform some operation (like encryption, decryption, CMAC generation…). If a key slot is empty, you will get ERC_KEY_EMPTY error.

Regards,

Lukas

View solution in original post

0 Kudos
Reply
2 Replies
1,091 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @xiaoweix 

It’s up to user to track the keys. There’s no flag which would inform you if a key is loaded or not. And because Memory Update Protocol must be followed to import or update a key, it not possible to “load a key again”. There’s a counter for each key which must be incremented if you want to update a key.

If you try to load the same key again (I mean with the same counter, so M1-M3 values are the same) then the key update won’t be successful and you will get error ERC_KEY_UPDATE_ERROR.

There’s one workaround to check if a key slot is still empty or if it is already loaded. You can try to perform some operation (like encryption, decryption, CMAC generation…). If a key slot is empty, you will get ERC_KEY_EMPTY error.

Regards,

Lukas

0 Kudos
Reply
1,080 Views
xiaoweix
Contributor III
好的,谢谢啦
0 Kudos
Reply