PRF function in HSE

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

PRF function in HSE

6,540 Views
ashwini2024
Contributor II

Hello
 
I am working on BSP 43 and I have enabled HSE I am using the HSE version : HSE_FW_S32G3XX_0_2_64_0. I am able to generate the pre-master successfully , I am trying to generate the master key by using the PRF function for TLS 1.2 , but its failing to generate it. I am following the HSE_API_REFERENCE_MANUAL , in order to generate the master key. Could you please let me know whether the inputs I am passing is valid.

The below is my code attached.

0 Kudos
Reply
20 Replies

6,522 Views
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @ashwini2024 ,

Thanks for reaching out to us again. Please share the following information:

- The HSE response you are getting when executing the service

- the contents of srv_desc.hseSrv.keyDeriveReq.sch.TLS12Prf, preferably in text or bin format, but in image it can also work.

 

Thanks!

0 Kudos
Reply

6,480 Views
ashwini2024
Contributor II

1. The HSE service response is as attached in the image1.png.
2. Regarding the contents of the PRF function I have attached the master.c program above.

0 Kudos
Reply

6,467 Views
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @ashwini2024,

Thanks for the information, I see that the error is just "general error" so we cannot get much details following that. 

About the contents of srv_desc.hseSrv.keyDeriveReq.sch.TLS12Prf, sorry for not asking more clearly, I meant the contents of the structure at run time, this is to get the actual information that is being sent to the HSE.

 

Thanks in advance.

0 Kudos
Reply

6,425 Views
ashwini2024
Contributor II

Thank you for the clarification. 
I will attach the output in image3.png.

0 Kudos
Reply

6,420 Views
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @ashwini2024

Thanks for the information, here are my findings, some are just recommendations since I do not know your setup:

You are usgin the following parameter as "not used", while the API manual indicates that for "master secret" is needed

alejandro_e_0-1753214852050.png

Ensure the key handle (0x00020600) has the required flags

alejandro_e_1-1753214956373.png

Please use a different key handle than pskKeyHandle, since they have different requirements

alejandro_e_2-1753215005417.png

Please ensure that the targetKeyHandle (0x00000000) has the required flags

alejandro_e_3-1753215119726.png

 

 

Please check the noes above and let me know if the behavior changes, if you receive a different error, please let me know.

 

Thanks!

 

 

0 Kudos
Reply

6,402 Views
ashwini2024
Contributor II

Hello

Thank you for the reply.

As per your inputs I have updated my code and is as attached I am still facing the same issue.
I have also attached the flags that are set for each key handle.

0 Kudos
Reply

6,397 Views
ashwini2024
Contributor II

Here is the updated code.

0 Kudos
Reply

6,398 Views
ashwini2024
Contributor II

Here are the attached files.

0 Kudos
Reply

6,148 Views
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @ashwini2024,

Thanks for the test, Please test using different key slots for pskKeyHandle and srcKeyHandle. Please ensure the requirements detailed in the API ref manual are met:

alejandro_e_0-1753738868551.png

alejandro_e_1-1753738877551.png

 

Please let me know if the behavior changes,
Thanks

 

0 Kudos
Reply

6,036 Views
ashwini2024
Contributor II

Hello 

Please have a look at my service descriptor values that I am passing I have updated the key handles. But still I am facing the general error , I do not understand why i dont get invalid parameters error if the inputs I pass are invalid.

0 Kudos
Reply

5,905 Views
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @ashwini2024,

did you mean yo attach another version of your service descriptor? I cannot see any file. 

About the error, this might be because it the params are "valid values" but invalid at a "logic level".

 

Let me know if you meant to attach another file or you meant the original one

Thanks

0 Kudos
Reply

5,860 Views
ashwini2024
Contributor II

Hello , 
Here is my updated code.
Also I have generated a AES-128 bit key in NVM slot and set the usage flag for the key handle as :HSE_KF_USAGE_DERIVE

Please let me know what is the issue with my service descriptor and why I am facing the general error.

0 Kudos
Reply

5,846 Views
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @ashwini2024,

Please share the output of the prints you have in your program and the key flags you have for the the three key slots you are using:

GET_KEY_HANDLE(HSE_KEY_CATALOG_ID_RAM, 6, 0)
GET_KEY_HANDLE(HSE_KEY_CATALOG_ID_NVM, 1, 3)
GET_KEY_HANDLE(HSE_KEY_CATALOG_ID_RAM, 7, 0)

 

Also please use memcpy instead of the assignment operator, as done in the demo app to avoid any problems:

alejandro_e_0-1754075663505.png

 

 

Thanks

0 Kudos
Reply

5,711 Views
ashwini2024
Contributor II

Hello @alejandro_e,
Would you be able to reproduce the master key generation process on your end and let me know if it works for you?

0 Kudos
Reply

5,395 Views
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @ashwini2024,

I have not tested, I been somewhat overloaded the pasts weeks and setting up a Linux Configuration with HSE might take some time which I cannot fit in my schedule at the moment. For now I can only guide you following the information you share and the documentation available.

Have you done other test which might help us narrow down the problem?

 

Thanks. 

0 Kudos
Reply

5,300 Views
ashwini2024
Contributor II

I have attached the usage flags for the key handles.

0 Kudos
Reply

5,302 Views
ashwini2024
Contributor II

Thank you very much for your response. I’ve updated the code based on your suggestions, but I’m still encountering the same error.

0 Kudos
Reply

5,272 Views
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @ashwini2024,

I contacted the internal team in parallel and they gave me relevant information, there is a sample project (of which I was not aware until now) , it includes examples on how to use HSE fo TLS, you can download it from FlexNet, it is under Automotive SW – S32G Reference Software and it is named Automotive SW - S32G - mbedTLS, after downloading and installing the exe installer, SW32G3XX_MbedTLS(wHSE)_RTM_1.0.0_230224.exe, you will have the sample project in C:\NXP\SW32G3XX_MbedTLS(wHSE)_RTM_1.0.0.

 

Please let me know if you need anything else

0 Kudos
Reply

6,042 Views
ashwini2024
Contributor II

Could you please let me know which key handle i must use from the HSE firmware version :HSE_FW_S32G3XX_0_2_64_0 for psk handle , src handle and target handle in the global_defs.h for hse standard firmware.

0 Kudos
Reply

6,045 Views
ashwini2024
Contributor II

Hi @alejandro_e,

I've noticed that in pkcs11, the following mechanisms are defined:
#define CKM_TLS_PRE_MASTER_KEY_GEN (0x374UL)
#define CKM_TLS_MASTER_KEY_DERIVE (0x375UL)
#define CKM_TLS_KEY_AND_MAC_DERIVE (0x376UL)

However, I couldn't find any implementation for these mechanisms. Could you please guide me on where I can add my own custom implementations for them?Is it possible to send a custom implementation for the same?

Thanks!

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2136514%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EPRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136514%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EI%20am%20working%20on%20BSP%2043%20and%20I%20have%20enabled%20HSE%20I%20am%20using%20the%20HSE%20version%20%3A%20%3CSPAN%3EHSE_FW_S32G3XX_0_2_64_0%3C%2FSPAN%3E.%20I%20am%20able%20to%20generate%20the%20pre-master%20successfully%20%2C%20I%20am%20trying%20to%20generate%20the%20master%20key%20by%20using%20the%20PRF%20function%20for%20TLS%201.2%20%2C%20but%20its%20failing%20to%20generate%20it.%20I%20am%20following%20the%20HSE_API_REFERENCE_MANUAL%20%2C%20in%20order%20to%20generate%20the%20master%20key.%20Could%20you%20please%20let%20me%20know%20whether%20the%20inputs%20I%20am%20passing%20is%20valid.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20below%20is%20my%20code%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2151036%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2151036%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%2F234952%22%20target%3D%22_blank%22%3E%40ashwini2024%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EI%20contacted%20the%20internal%20team%20in%20parallel%20and%20they%20gave%20me%20relevant%20information%2C%20there%20is%20a%20sample%20project%20(of%20which%20I%20was%20not%20aware%20until%20now)%20%2C%20it%20includes%20examples%20on%20how%20to%20use%20HSE%20fo%20TLS%2C%20you%20can%20download%20it%20from%20FlexNet%2C%20it%20is%20under%26nbsp%3B%3CEM%3EAutomotive%20SW%20%E2%80%93%20S32G%20Reference%20Software%20%3C%2FEM%3Eand%20it%20is%20named%26nbsp%3B%3CEM%3EAutomotive%20SW%20-%20S32G%20-%20mbedTLS%3C%2FEM%3E%2C%20after%20downloading%20and%20installing%20the%20exe%20installer%2C%26nbsp%3B%3CSTRONG%3ESW32G3XX_MbedTLS(wHSE)_RTM_1.0.0_230224.exe%3C%2FSTRONG%3E%2C%20you%20will%20have%20the%20sample%20project%20in%26nbsp%3B%3CEM%3EC%3A%5CNXP%5CSW32G3XX_MbedTLS(wHSE)_RTM_1.0.0%3C%2FEM%3E.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EPlease%20let%20me%20know%20if%20you%20need%20anything%20else%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2149717%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2149717%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20have%20attached%20the%20usage%20flags%20for%20the%20key%20handles.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2149695%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2149695%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20very%20much%20for%20your%20response.%20I%E2%80%99ve%20updated%20the%20code%20based%20on%20your%20suggestions%2C%20but%20I%E2%80%99m%20still%20encountering%20the%20same%20error.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2149386%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2149386%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%2F234952%22%20target%3D%22_blank%22%3E%40ashwini2024%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EI%20have%20not%20tested%2C%20I%20been%20somewhat%20overloaded%20the%20pasts%20weeks%20and%20setting%20up%20a%20Linux%20Configuration%20with%20HSE%20might%20take%20some%20time%20which%20I%20cannot%20fit%20in%20my%20schedule%20at%20the%20moment.%20For%20now%20I%20can%20only%20guide%20you%20following%20the%20information%20you%20share%20and%20the%20documentation%20available.%3C%2FP%3E%0A%3CP%3EHave%20you%20done%20other%20test%20which%20might%20help%20us%20narrow%20down%20the%20problem%3F%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThanks.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2147504%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2147504%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F238460%22%20target%3D%22_blank%22%3E%40alejandro_e%3C%2FA%3E%2C%3CBR%20%2F%3EWould%20you%20be%20able%20to%20reproduce%20the%20master%20key%20generation%20process%20on%20your%20end%20and%20let%20me%20know%20if%20it%20works%20for%20you%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2145490%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2145490%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%2F234952%22%20target%3D%22_blank%22%3E%40ashwini2024%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EPlease%20share%20the%20output%20of%20the%20prints%20you%20have%20in%20your%20program%20and%20the%20key%20flags%20you%20have%20for%20the%20the%20three%20key%20slots%20you%20are%20using%3A%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3EGET_KEY_HANDLE%3C%2FSPAN%3E%3CSPAN%3E(HSE_KEY_CATALOG_ID_RAM%2C%20%3C%2FSPAN%3E%3CSPAN%3E6%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3E0%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3EGET_KEY_HANDLE%3C%2FSPAN%3E%3CSPAN%3E(HSE_KEY_CATALOG_ID_NVM%2C%20%3C%2FSPAN%3E%3CSPAN%3E1%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3E3%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3EGET_KEY_HANDLE%3C%2FSPAN%3E%3CSPAN%3E(HSE_KEY_CATALOG_ID_RAM%2C%20%3C%2FSPAN%3E%3CSPAN%3E7%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3E0%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CBR%20%2F%3E%0A%3CP%3EAlso%20please%20use%20memcpy%20instead%20of%20the%20assignment%20operator%2C%20as%20done%20in%20the%20demo%20app%20to%20avoid%20any%20problems%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22alejandro_e_0-1754075663505.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22alejandro_e_0-1754075663505.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F350669i981A13F28EDDA64C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22alejandro_e_0-1754075663505.png%22%20alt%3D%22alejandro_e_0-1754075663505.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2143170%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2143170%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20%2C%26nbsp%3B%3CBR%20%2F%3EHere%20is%20my%20updated%20code.%3CBR%20%2F%3EAlso%20I%20have%20generated%20a%20AES-128%20bit%20key%20in%20NVM%20slot%20and%20set%20the%20usage%20flag%20for%20the%20key%20handle%20as%20%3AHSE_KF_USAGE_DERIVE%3CBR%20%2F%3E%3CBR%20%2F%3EPlease%20let%20me%20know%20what%20is%20the%20issue%20with%20my%20service%20descriptor%20and%20why%20I%20am%20facing%20the%20general%20error.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2143025%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2143025%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%2F234952%22%20target%3D%22_blank%22%3E%40ashwini2024%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3Edid%20you%20mean%20yo%20attach%20another%20version%20of%20your%20service%20descriptor%3F%20I%20cannot%20see%20any%20file.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAbout%20the%20error%2C%20this%20might%20be%20because%20it%20the%20params%20are%20%22valid%20values%22%20but%20invalid%20at%20a%20%22logic%20level%22.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ELet%20me%20know%20if%20you%20meant%20to%20attach%20another%20file%20or%20you%20meant%20the%20original%20one%3C%2FP%3E%0A%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2142765%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2142765%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EPlease%20have%20a%20look%20at%20my%20service%20descriptor%20values%20that%20I%20am%20passing%20I%20have%20updated%20the%20key%20handles.%20But%20still%20I%20am%20facing%20the%20general%20error%20%2C%20I%20do%20not%20understand%20why%20i%20dont%20get%20invalid%20parameters%20error%20if%20the%20inputs%20I%20pass%20are%20invalid.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2142574%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2142574%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ECould%20you%20please%20let%20me%20know%20which%20key%20handle%20i%20must%20use%20from%20the%20HSE%20firmware%20version%20%3A%3CSPAN%3EHSE_FW_S32G3XX_0_2_64_0%26nbsp%3B%3C%2FSPAN%3Efor%20psk%20handle%20%2C%20src%20handle%20and%20target%20handle%20in%20the%20global_defs.h%20for%20hse%20standard%20firmware.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2142372%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2142372%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F238460%22%20target%3D%22_blank%22%3E%40alejandro_e%3C%2FA%3E%2C%3C%2FP%3E%3CP%3EI've%20noticed%20that%20in%26nbsp%3Bpkcs11%2C%20the%20following%20mechanisms%20are%20defined%3A%3CBR%20%2F%3E%23define%20CKM_TLS_PRE_MASTER_KEY_GEN%20(0x374UL)%3CBR%20%2F%3E%23define%20CKM_TLS_MASTER_KEY_DERIVE%20(0x375UL)%3CBR%20%2F%3E%23define%20CKM_TLS_KEY_AND_MAC_DERIVE%20(0x376UL)%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EHowever%2C%20I%20couldn't%20find%20any%20implementation%20for%20these%20mechanisms.%20Could%20you%20please%20guide%20me%20on%20where%20I%20can%20add%20my%20own%20custom%20implementations%20for%20them%3FIs%20it%20possible%20to%20send%20a%20custom%20implementation%20for%20the%20same%3F%3C%2FP%3E%3CP%3EThanks!%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2142059%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2142059%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%2F234952%22%20target%3D%22_blank%22%3E%40ashwini2024%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EThanks%20for%20the%20test%2C%20Please%20test%20using%20different%20key%20slots%20for%26nbsp%3BpskKeyHandle%20and%26nbsp%3BsrcKeyHandle.%20Please%20ensure%20the%20requirements%20detailed%20in%20the%20API%20ref%20manual%20are%20met%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22alejandro_e_0-1753738868551.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22alejandro_e_0-1753738868551.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F349817i5914B1FF6A574411%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22alejandro_e_0-1753738868551.png%22%20alt%3D%22alejandro_e_0-1753738868551.png%22%20%2F%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%22alejandro_e_1-1753738877551.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22alejandro_e_1-1753738877551.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F349818i1DC8D5C1DF13B212%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22alejandro_e_1-1753738877551.png%22%20alt%3D%22alejandro_e_1-1753738877551.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EPlease%20let%20me%20know%20if%20the%20behavior%20changes%2C%3CBR%20%2F%3EThanks%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2139844%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139844%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHere%20is%20the%20updated%20code.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2139840%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139840%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHere%20are%20the%20attached%20files.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2139836%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139836%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20for%20the%20reply.%3CBR%20%2F%3E%3CBR%20%2F%3EAs%20per%20your%20inputs%20I%20have%20updated%20my%20code%20and%20is%20as%20attached%20I%20am%20still%20facing%20the%20same%20issue.%3CBR%20%2F%3EI%20have%20also%20attached%20the%20flags%20that%20are%20set%20for%20each%20key%20handle.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2138682%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2138682%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%2F234952%22%20target%3D%22_blank%22%3E%40ashwini2024%3C%2FA%3E%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20the%20information%2C%20here%20are%20my%20findings%2C%20some%20are%20just%20recommendations%20since%20I%20do%20not%20know%20your%20setup%3A%3C%2FP%3E%0A%3CP%3EYou%20are%20usgin%20the%20following%20parameter%20as%20%22not%20used%22%2C%20while%20the%20API%20manual%20indicates%20that%20for%20%22master%20secret%22%20is%20needed%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22alejandro_e_0-1753214852050.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22alejandro_e_0-1753214852050.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348890i2F3D365D6D20B772%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22alejandro_e_0-1753214852050.png%22%20alt%3D%22alejandro_e_0-1753214852050.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EEnsure%20the%20key%20handle%20(0x00020600)%20has%20the%20required%20flags%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22alejandro_e_1-1753214956373.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22alejandro_e_1-1753214956373.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348891i35E20A8443F4C4F0%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22alejandro_e_1-1753214956373.png%22%20alt%3D%22alejandro_e_1-1753214956373.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EPlease%20use%20a%20different%20key%20handle%20than%20pskKeyHandle%2C%20since%20they%20have%20different%20requirements%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22alejandro_e_2-1753215005417.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22alejandro_e_2-1753215005417.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348892i4D84E476BF80A12C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22alejandro_e_2-1753215005417.png%22%20alt%3D%22alejandro_e_2-1753215005417.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EPlease%20ensure%20that%20the%20targetKeyHandle%20(0x00000000)%20has%20the%20required%20flags%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22alejandro_e_3-1753215119726.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22alejandro_e_3-1753215119726.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348893iE88729BB2509A924%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22alejandro_e_3-1753215119726.png%22%20alt%3D%22alejandro_e_3-1753215119726.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3EPlease%20check%20the%20noes%20above%20and%20let%20me%20know%20if%20the%20behavior%20changes%2C%20if%20you%20receive%20a%20different%20error%2C%20please%20let%20me%20know.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThanks!%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2138493%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2138493%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20for%20the%20clarification.%26nbsp%3B%3CBR%20%2F%3EI%20will%20attach%20the%20output%20in%20image3.png.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2137608%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2137608%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%2F234952%22%20target%3D%22_blank%22%3E%40ashwini2024%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EThanks%20for%20the%20information%2C%20I%20see%20that%20the%20error%20is%20just%20%22general%20error%22%20so%20we%20cannot%20get%20much%20details%20following%20that.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAbout%20the%20contents%20of%26nbsp%3B%3CSTRONG%3Esrv_desc.hseSrv.keyDeriveReq.sch.TLS12Prf%3C%2FSTRONG%3E%2C%20sorry%20for%20not%20asking%20more%20clearly%2C%20I%20meant%20the%20contents%20of%20the%20structure%20at%20run%20time%2C%20this%20is%20to%20get%20the%20actual%20information%20that%20is%20being%20sent%20to%20the%20HSE.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2136998%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136998%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E1.%20The%20HSE%20service%20response%20is%20as%20attached%20in%20the%20image1.png.%3CBR%20%2F%3E2.%20Regarding%20the%20contents%20of%20the%20PRF%20function%20I%20have%20attached%20the%20master.c%20program%20above.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2136749%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PRF%20function%20in%20HSE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136749%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%2F234952%22%20target%3D%22_blank%22%3E%40ashwini2024%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EThanks%20for%20reaching%20out%20to%20us%20again.%20Please%20share%20the%20following%20information%3A%3C%2FP%3E%0A%3CP%3E-%20The%20HSE%20response%20you%20are%20getting%20when%20executing%20the%20service%3C%2FP%3E%0A%3CP%3E-%20the%20contents%20of%26nbsp%3B%3CSTRONG%20style%3D%22font-family%3A%20inherit%3B%22%3Esrv_desc.hseSrv.keyDeriveReq.sch.TLS12Prf%3C%2FSTRONG%3E%2C%20preferably%20in%20text%20or%20bin%20format%2C%20but%20in%20image%20it%20can%20also%20work.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E