HSE on S32K344 - Symmetric Encryption not possible

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

HSE on S32K344 - Symmetric Encryption not possible

Jump to solution
4,055 Views
jthelemann
Contributor II

Hello everybody,

currently I am working with the HSE-B on a S32K344. I want to use the "HSE_SRV_ID_SYM_CIPHER" service in order to perform an AES-CTR encryption/decryption of data in flash memory. When calling the corresponding HSE Service, I always get the error code "HSE_SRV_RSP_NOT_ALLOWED". I already read the HSE Firmware Reference Manual in order to identify the problem, but I cannot figure it out.

I attached picture of following things:

  • Definition of the NVM key attributes (inclusive symmetric key)
  • Definition of the corresponding HSE Service 
  • Function call of the corresponding HSE Service

Hope you can help to get rid of this problem.

Thanks!

0 Kudos
Reply
1 Solution
4,028 Views
jthelemann
Contributor II

Hi Lukas,

I could solve the problem by sending the corresponding HSE service request over a different MU channel (e.g. 1) instead over the MU admin channel "0".

Best regards,

Julian Thelemann

View solution in original post

0 Kudos
Reply
2 Replies
4,032 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @jthelemann 

at first glance, it looks good. I can see nothing obvious wrong.

Isn't there a problem with data cache? All the data structures used for communication with HSE must be forced to non-cacheable RAM. Easiest option is to disable the data cache completely to see if it makes a difference.

Regards,

Lukas

0 Kudos
Reply
4,029 Views
jthelemann
Contributor II

Hi Lukas,

I could solve the problem by sending the corresponding HSE service request over a different MU channel (e.g. 1) instead over the MU admin channel "0".

Best regards,

Julian Thelemann

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1870279%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHSE%20on%20S32K344%20-%20Symmetric%20Encryption%20not%20possible%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1870279%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20everybody%2C%3C%2FP%3E%3CP%3Ecurrently%20I%20am%20working%20with%20the%20HSE-B%20on%20a%20S32K344.%20I%20want%20to%20use%20the%20%22%3CSTRONG%3EHSE_SRV_ID_SYM_CIPHER%22%3C%2FSTRONG%3E%20service%20in%20order%20to%20perform%20an%20AES-CTR%20encryption%2Fdecryption%20of%20data%20in%20flash%20memory.%20When%20calling%20the%20corresponding%20HSE%20Service%2C%20I%20always%20get%20the%20error%20code%20%3CSTRONG%3E%22HSE_SRV_RSP_NOT_ALLOWED%22%3C%2FSTRONG%3E.%20I%20already%20read%20the%20HSE%20Firmware%20Reference%20Manual%20in%20order%20to%20identify%20the%20problem%2C%20but%20I%20cannot%20figure%20it%20out.%3C%2FP%3E%3CP%3EI%20attached%20picture%20of%20following%20things%3A%3C%2FP%3E%3CUL%3E%3CLI%3EDefinition%20of%20the%20NVM%20key%20attributes%20(inclusive%20symmetric%20key)%3C%2FLI%3E%3CLI%3EDefinition%20of%20the%20corresponding%20HSE%20Service%26nbsp%3B%3C%2FLI%3E%3CLI%3EFunction%20call%20of%20the%20corresponding%20HSE%20Service%3C%2FLI%3E%3C%2FUL%3E%3CP%3EHope%20you%20can%20help%20to%20get%20rid%20of%20this%20problem.%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1871701%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20HSE%20on%20S32K344%20-%20Symmetric%20Encryption%20not%20possible%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1871701%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Lukas%2C%3C%2FP%3E%3CP%3EI%20could%20solve%20the%20problem%20by%20sending%20the%20corresponding%20HSE%20service%20request%20over%20a%20different%20MU%20channel%20(e.g.%201)%20instead%20over%20the%20MU%20admin%20channel%20%220%22.%3C%2FP%3E%3CP%3EBest%20regards%2C%3C%2FP%3E%3CP%3EJulian%20Thelemann%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1871681%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20HSE%20on%20S32K344%20-%20Symmetric%20Encryption%20not%20possible%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1871681%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F227404%22%20target%3D%22_blank%22%3E%40jthelemann%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eat%20first%20glance%2C%20it%20looks%20good.%20I%20can%20see%20nothing%20obvious%20wrong.%3C%2FP%3E%0A%3CP%3EIsn't%20there%20a%20problem%20with%20data%20cache%3F%20All%20the%20data%20structures%20used%20for%20communication%20with%20HSE%20must%20be%20forced%20to%20non-cacheable%20RAM.%20Easiest%20option%20is%20to%20disable%20the%20data%20cache%20completely%20to%20see%20if%20it%20makes%20a%20difference.%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E