Check if Keys are zero or not

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

Check if Keys are zero or not

跳至解决方案
1,443 次查看
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 项奖励
回复
1 解答
1,407 次查看
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 项奖励
回复
1 回复
1,408 次查看
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 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-1859374%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E6%A3%80%E6%9F%A5%20Keys%20%E6%98%AF%E5%90%A6%E4%B8%BA%E9%9B%B6%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1859374%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%E6%88%91%E6%83%B3%E6%A3%80%E6%9F%A5%20NVM%20%E4%B8%AD%E5%AD%98%E5%82%A8%E7%9A%84%E5%AF%86%E9%92%A5%E6%98%AF%E5%90%A6%E4%B8%BA%E9%9B%B6%E3%80%82%E6%98%AF%E5%90%A6%E5%8F%AF%E4%BB%A5%EF%BC%9F%E5%AF%86%E9%92%A5%E7%9A%84%E6%A0%BC%E5%BC%8F%E4%B8%BABIN_OCTET%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E5%B0%9D%E8%AF%95%E4%BD%BF%E7%94%A8%20Crypto_Hse_KeyElementGet%20API%EF%BC%8C%E4%BD%86%E6%94%B6%E5%88%B0%E7%9A%84%E5%93%8D%E5%BA%94%E6%98%AF%20HSE_SRV_RSP_INVALID_ADDR%E3%80%82%3C%2FP%3E%3CP%3E%E9%9D%9E%E5%B8%B8%E6%84%9F%E8%B0%A2%E4%BB%BB%E4%BD%95%E5%AF%B9%E6%AD%A4%E6%8F%90%E4%BE%9B%E7%9A%84%E5%B8%AE%E5%8A%A9%EF%BC%81%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1863437%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%A3%80%E6%9F%A5%E9%94%AE%E6%98%AF%E5%90%A6%E4%B8%BA%E9%9B%B6%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1863437%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F227526%22%20target%3D%22_blank%22%3E%40shravani%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%E6%8D%AE%E6%88%91%E6%89%80%E7%9F%A5%EF%BC%8C%E6%82%A8%E4%BD%BF%E7%94%A8%20SHE%20%E9%94%AE%E3%80%82SHE%20%E5%AF%86%E9%92%A5%E6%97%A0%E6%B3%95%E5%AF%BC%E5%87%BA%EF%BC%88%E5%8F%AA%E6%9C%89%20SHE%20RAM%20%E5%AF%86%E9%92%A5%E6%98%AF%E4%B8%AA%E4%BE%8B%E5%A4%96%EF%BC%89%EF%BC%8C%E5%B9%B6%E4%B8%94%E4%B9%9F%E6%97%A0%E6%B3%95%E8%8E%B7%E5%8F%96%20SHE%20%E5%AF%86%E9%92%A5%E7%9A%84%20KeyInfo%E3%80%82%E5%9C%A8%E8%BF%99%E7%A7%8D%E6%83%85%E5%86%B5%E4%B8%8B%EF%BC%8C%E6%A3%80%E6%9F%A5%20SHE%20%E5%AF%86%E9%92%A5%E6%98%AF%E5%90%A6%E4%B8%BA%E7%A9%BA%E7%9A%84%E5%94%AF%E4%B8%80%E9%80%89%E6%8B%A9%E6%98%AF%E5%B0%9D%E8%AF%95%E4%BD%BF%E7%94%A8%E8%AF%A5%E5%AF%86%E9%92%A5%E3%80%82%E5%A6%82%E6%9E%9C%E5%AE%83%E4%BB%8D%E7%84%B6%E4%B8%BA%E7%A9%BA%EF%BC%8C%E6%82%A8%E5%BA%94%E8%AF%A5%E4%BC%9A%E6%94%B6%E5%88%B0%20CRYPTO_E_KEY_EMPTY%20%E9%94%99%E8%AF%AF%E3%80%82%3C%2FP%3E%0A%3CP%3E%E6%AD%A4%E8%87%B4%EF%BC%8C%3C%2FP%3E%0A%3CP%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E