HSE_SRV_ID_IMPORT_KEY returns HSE_SRV_RSP_INVALID_PARAM 0x55A5A399 on S32k314

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

HSE_SRV_ID_IMPORT_KEY returns HSE_SRV_RSP_INVALID_PARAM 0x55A5A399 on S32k314

Jump to solution
912 Views
CosminSbera
Contributor II

Hello,

I'm currently working with S32K314 microcontroller, using S32K344_0_2_55_0 HSE with AB swap configuration.

I'm trying to import a AES CMAC key using service HSE_SRV_ID_IMPORT_KEY and it always return HSE_SRV_RSP_INVALID_PARAM. My current microcontroller state is:

- Lifecycle = CUST_DEL (0x04)

- INSTALL_OK = 0

I've try to create a custom AES catalogue. This request generates an error error HSE_SRV_RSP_NOT_ALLOWED 0xAA55A21.

I've make sure that all the buffers that parsed to HSE are located inside SRAM.

I even manage to run the erase service. It respond ok.

Given all the above I sill end up in HSE_SRV_RSP_INVALID_PARAM  error.

Any idea what I could check next?

Thank you in advance!

0 Kudos
Reply
1 Solution
825 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

All groups in RAM catalog must use owner HSE_KEY_OWNER_ANY. You can’t use HSE_KEY_OWNER_CUST here.

 

All groups in NVM catalog must use owner HSE_KEY_OWNER_CUST or HSE_KEY_OWNER_OEM. But HSE_KEY_TYPE_SHE is an exception – this must be HSE_KEY_OWNER_ANY also in NVM catalog.

lukaszadrapa_0-1781266224583.pnglukaszadrapa_0-1781266224583.png

lukaszadrapa_1-1781266231149.pnglukaszadrapa_1-1781266231149.png

Regards,

Lukas

View solution in original post

0 Kudos
Reply
4 Replies
879 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @CosminSbera 

 

If HSE_STATUS_INSTALL_OK is ‘0’, the catalogs are not formatted, so you can’t import a key.

How did you configured the catalogs?

 

Take a look at description of hseFormatKeyCatalogsSrv_t structure in HSE Service API reference manual:

c:\NXP\HSE_FW_S32K344_0_2_55_0\docs\S32K3X4_HSE_Service_API_Reference_Manual.pdf

There’s a list of requirements which need to be met.

 

And take a look at section “6.1.5.3 Key catalog formatting” in HSE firmware reference manual rev. 2.7. There’s a list of reasons why the formatting may fail.

 

Regards,

Lukas

0 Kudos
Reply
842 Views
CosminSbera
Contributor II

Hello @lukaszadrapa .

Thank you for the quick response. 

I've tried to installed the key catalogue with a minimal configuration, but it was not successful. It respond with HSE_SRV_RSP_NOT_ALLOWED.

This is my catalogue configuration.

CosminSbera_0-1781250627017.pngCosminSbera_0-1781250627017.png

Any tips on what I could check next?

Thank you in advance!

 

0 Kudos
Reply
826 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

All groups in RAM catalog must use owner HSE_KEY_OWNER_ANY. You can’t use HSE_KEY_OWNER_CUST here.

 

All groups in NVM catalog must use owner HSE_KEY_OWNER_CUST or HSE_KEY_OWNER_OEM. But HSE_KEY_TYPE_SHE is an exception – this must be HSE_KEY_OWNER_ANY also in NVM catalog.

lukaszadrapa_0-1781266224583.pnglukaszadrapa_0-1781266224583.png

lukaszadrapa_1-1781266231149.pnglukaszadrapa_1-1781266231149.png

Regards,

Lukas

0 Kudos
Reply
818 Views
CosminSbera
Contributor II
Thank you for the quick replay!

The problem was indeed the content of the key catalogue!

Regards,
Cosmin
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2380138%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHSE_SRV_ID_IMPORT_KEY%20returns%20HSE_SRV_RSP_INVALID_PARAM%200x55A5A399%20on%20S32k314%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2380138%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI'm%20currently%20working%20with%20S32K314%20microcontroller%2C%20using%26nbsp%3BS32K344_0_2_55_0%20HSE%20with%20AB%20swap%20configuration.%3C%2FP%3E%3CP%3EI'm%20trying%20to%20import%20a%20AES%20CMAC%20key%20using%20service%20HSE_SRV_ID_IMPORT_KEY%20and%20it%20always%20return%26nbsp%3BHSE_SRV_RSP_INVALID_PARAM.%20My%20current%20microcontroller%20state%20is%3A%3C%2FP%3E%3CP%3E-%20Lifecycle%20%3D%20CUST_DEL%20(0x04)%3C%2FP%3E%3CP%3E-%20INSTALL_OK%20%3D%200%3C%2FP%3E%3CP%3EI've%20try%20to%20create%20a%20custom%20AES%20catalogue.%20This%20request%20generates%20an%20error%20error%26nbsp%3B%3CSPAN%3EHSE_SRV_RSP_NOT_ALLOWED%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E0xAA55A21.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI've%20make%20sure%20that%20all%20the%20buffers%20that%20parsed%20to%20HSE%20are%20located%20inside%20SRAM.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20even%20manage%20to%20run%20the%20erase%20service.%20It%20respond%20ok.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EGiven%20all%20the%20above%20I%20sill%20end%20up%20in%20HSE_SRV_RSP_INVALID_PARAM%26nbsp%3B%20error.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EAny%20idea%20what%20I%20could%20check%20next%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThank%20you%20in%20advance!%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2380622%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20HSE_SRV_ID_IMPORT_KEY%20returns%20HSE_SRV_RSP_INVALID_PARAM%200x55A5A399%20on%20S32k314%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2380622%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F37795%22%20target%3D%22_blank%22%3E%40lukaszadrapa%3C%2FA%3E%26nbsp%3B.%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20quick%20response.%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20tried%20to%20installed%20the%20key%20catalogue%20with%20a%20minimal%20configuration%2C%20but%20it%20was%20not%20successful.%20It%20respond%20with%26nbsp%3B%3CSPAN%3EHSE_SRV_RSP_NOT_ALLOWED.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThis%20is%20my%20catalogue%20configuration.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22CosminSbera_0-1781250627017.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22CosminSbera_0-1781250627017.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22CosminSbera_0-1781250627017.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22CosminSbera_0-1781250627017.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388838iE94BDCB575EB1CB3%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22CosminSbera_0-1781250627017.png%22%20alt%3D%22CosminSbera_0-1781250627017.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ECosminSbera_0-1781250627017.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EAny%20tips%20on%20what%20I%20could%20check%20next%3F%3C%2FP%3E%3CP%3EThank%20you%20in%20advance!%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2380313%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20HSE_SRV_ID_IMPORT_KEY%20returns%20HSE_SRV_RSP_INVALID_PARAM%200x55A5A399%20on%20S32k314%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2380313%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F255457%22%20target%3D%22_blank%22%3E%40CosminSbera%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EIf%20HSE_STATUS_INSTALL_OK%20is%20%E2%80%980%E2%80%99%2C%20the%20catalogs%20are%20not%20formatted%2C%20so%20you%20can%E2%80%99t%20import%20a%20key.%3C%2FP%3E%0A%3CP%3EHow%20did%20you%20configured%20the%20catalogs%3F%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ETake%20a%20look%20at%20description%20of%20hseFormatKeyCatalogsSrv_t%20structure%20in%20HSE%20Service%20API%20reference%20manual%3A%3C%2FP%3E%0A%3CP%3Ec%3A%5CNXP%5CHSE_FW_S32K344_0_2_55_0%5Cdocs%5CS32K3X4_HSE_Service_API_Reference_Manual.pdf%3C%2FP%3E%0A%3CP%3EThere%E2%80%99s%20a%20list%20of%20requirements%20which%20need%20to%20be%20met.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EAnd%20take%20a%20look%20at%20section%20%E2%80%9C6.1.5.3%20Key%20catalog%20formatting%E2%80%9D%20in%20HSE%20firmware%20reference%20manual%20rev.%202.7.%20There%E2%80%99s%20a%20list%20of%20reasons%20why%20the%20formatting%20may%20fail.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2380845%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20HSE_SRV_ID_IMPORT_KEY%20returns%20HSE_SRV_RSP_INVALID_PARAM%200x55A5A399%20on%20S32k314%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2380845%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EThank%20you%20for%20the%20quick%20replay!%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20problem%20was%20indeed%20the%20content%20of%20the%20key%20catalogue!%3CBR%20%2F%3E%3CBR%20%2F%3ERegards%2C%3CBR%20%2F%3ECosmin%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2380821%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20HSE_SRV_ID_IMPORT_KEY%20returns%20HSE_SRV_RSP_INVALID_PARAM%200x55A5A399%20on%20S32k314%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2380821%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAll%20groups%20in%20RAM%20catalog%20must%20use%20owner%20HSE_KEY_OWNER_ANY.%20You%20can%E2%80%99t%20use%20HSE_KEY_OWNER_CUST%20here.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EAll%20groups%20in%20NVM%20catalog%20must%20use%20owner%20HSE_KEY_OWNER_CUST%20or%20HSE_KEY_OWNER_OEM.%20But%20HSE_KEY_TYPE_SHE%20is%20an%20exception%20%E2%80%93%20this%20must%20be%20HSE_KEY_OWNER_ANY%20also%20in%20NVM%20catalog.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_0-1781266224583.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_0-1781266224583.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388858iC0D14B2C0F83F0DB%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_0-1781266224583.png%22%20alt%3D%22lukaszadrapa_0-1781266224583.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Elukaszadrapa_0-1781266224583.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_1-1781266231149.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_1-1781266231149.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388859iA1076D80E3A241ED%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_1-1781266231149.png%22%20alt%3D%22lukaszadrapa_1-1781266231149.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Elukaszadrapa_1-1781266231149.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E