Generate NVM key returns HSE_SRV_RSP_INVALID_PARAM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Generate NVM key returns HSE_SRV_RSP_INVALID_PARAM

ソリューションへジャンプ
1,124件の閲覧回数
kerti1
Contributor III

Hi,

 

I previously implemented CMAC generation and verification using a RAM key (hardcoded in the application), and it worked successfully. Now, I'm trying to switch to using a key generated by the HSE and stored in the NVM key catalog. However, when I attempt to generate the key, I receive the response HSE_SRV_RSP_INVALID_PARAM.

What could be the possible reasons for this error? Do I need to explicitly store the key in NVM after generation, or does the HSE handle that internally?

I've attached relevant code and images. Any guidance would be appreciated.

KeerthiT_0-1747138410211.pngKeerthiT_1-1747138445179.png

 

0 件の賞賛
返信
1 解決策
1,099件の閲覧回数
kerti1
Contributor III

Hi @lukaszadrapa ,

 

Thanks for the response. Just now I was able to generate the NVM keys. Yes, I always disable the Data cache.

2. How does your NVM key catalog look like? Is the KeyHandle correct?

   As you suggested, It is the issue of the NVM key catalog. I changed to the attached below.

KeerthiT_0-1747216941800.png

The NVM key must be empty when calling the service (it must be erased if it is not empty) and SuperUser rights are needed.

       I have superuser rights. How would i know that the NVM key is empty or not? If not how to erase it ?. I would be helpful if i get to know these.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,105件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @kerti1 

I can't see problem in the parameters.

1. Could you try to disable data cache to confirm it is not cache issue?

2. How does your NVM key catalog look like? Is the KeyHandle correct?

HSE_SRV_ID_KEY_GENERATE service stores the key to NVM catalog, it's not done by user. The NVM key must be empty when calling the service (it must be erased if it is not empty) and SuperUser rights are needed.

Regards,

Lukas

0 件の賞賛
返信
1,100件の閲覧回数
kerti1
Contributor III

Hi @lukaszadrapa ,

 

Thanks for the response. Just now I was able to generate the NVM keys. Yes, I always disable the Data cache.

2. How does your NVM key catalog look like? Is the KeyHandle correct?

   As you suggested, It is the issue of the NVM key catalog. I changed to the attached below.

KeerthiT_0-1747216941800.png

The NVM key must be empty when calling the service (it must be erased if it is not empty) and SuperUser rights are needed.

       I have superuser rights. How would i know that the NVM key is empty or not? If not how to erase it ?. I would be helpful if i get to know these.

0 件の賞賛
返信
1,086件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

All keys in RAM and in NVM are empty after catalog formatting. Easiest option to check if a key is empty or not: try to use such key. In your case, you can try to calculate CMAC over a few bytes. If the key is empty, you will get response HSE_ SRV_ RSP_ KEY_ EMPTY.

A key can be erased by HSE_SRV_ID_ERASE_KEY service:

lukaszadrapa_0-1747225361701.png

 Take a look at hseEraseKeySrv_t in HSE Service API reference manual for details.

Regards,

Lukas

 

0 件の賞賛
返信