Check if Keys are zero or not

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

Check if Keys are zero or not

Jump to solution
109 Views
shravani
Contributor II

Hi,

I want to check if keys stored in NVM are zero or not. Is it possible? The format of the keys is BIN_OCTET.

I tried it by using Crypto_Hse_KeyElementGet API, but I am getting HSE_SRV_RSP_INVALID_ADDR as a response.

Any help on this is highly appreciated!

0 Kudos
1 Solution
73 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @shravani 

As far as I know, you use SHE keys. SHE keys cannot be exported (only the SHE RAM key is an exception) and it's also not possible to get KeyInfo for SHE keys. In this case, the only option to check if SHE key is empty or not is to try to use such key. If it is still empty, you should get CRYPTO_E_KEY_EMPTY error.

Regards,

Lukas

View solution in original post

0 Kudos
1 Reply
74 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @shravani 

As far as I know, you use SHE keys. SHE keys cannot be exported (only the SHE RAM key is an exception) and it's also not possible to get KeyInfo for SHE keys. In this case, the only option to check if SHE key is empty or not is to try to use such key. If it is still empty, you should get CRYPTO_E_KEY_EMPTY error.

Regards,

Lukas

0 Kudos