Key Catalogs in S32K344

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

Key Catalogs in S32K344

1,111 Views
silvia_zandoli2
Contributor II

Hello, I'm doing a crypto test in Basic Secure Boot. I attach main.c file
At this point 
rsp = HSE_ECC_ComputeSecretAndSetAes(peerPubKey);
if (rsp != HSE_SRV_RSP_OK) while (1);

it goes into while (1) because rsp has error code 0x55A5A399 

Maybe the problem is how I am formatting key catalogs

Tags (2)
0 Kudos
Reply
2 Replies

1,011 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @silvia_zandoli2 

I can't see HSE_ECC_ComputeSecretAndSetAes function in your code. And such function is not present in the HSE framework. 

Regards,

Lukas

0 Kudos
Reply

887 Views
silvia_zandoli2
Contributor II

Hello, that function si defined by myself.
I report the definition. The code of the function is in the attached file. Thank you
The HSE_ECC_ComputeSecretAndSetAes function orchestrates the secure key exchange protocol. It first imports the external Peer Public Key into the HSE secure memory. Subsequently, it triggers the ECDH (Elliptic Curve Diffie-Hellman) algorithm to calculate a Shared Secret using the device's internal private key. Finally, it derives a usable 128-bit AES Session Key from this secret, which remains locked inside the HSE for secure data encryption and decryption.

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2265311%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EKey%20Catalogs%20in%20S32K344%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2265311%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%20I'm%20doing%20a%20crypto%20test%20in%20Basic%20Secure%20Boot.%26nbsp%3BI%20attach%20main.c%20file%3CBR%20%2F%3EAt%20this%20point%26nbsp%3B%3CBR%20%2F%3Ersp%20%3D%20HSE_ECC_ComputeSecretAndSetAes(peerPubKey)%3B%3CBR%20%2F%3Eif%20(rsp%20!%3D%20HSE_SRV_RSP_OK)%20while%20(1)%3B%3C%2FP%3E%3CP%3Eit%20goes%20into%20while%20(1)%20because%20rsp%20has%20error%20code%26nbsp%3B%3CSPAN%3E0x55A5A399%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EMaybe%20the%20problem%20is%20how%20I%20am%20formatting%20key%20catalogs%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2266567%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Key%20Catalogs%20in%20S32K344%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2266567%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%2F248858%22%20target%3D%22_blank%22%3E%40silvia_zandoli2%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20can't%20see%26nbsp%3BHSE_ECC_ComputeSecretAndSetAes%20function%20in%20your%20code.%20And%20such%20function%20is%20not%20present%20in%20the%20HSE%20framework.%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2268254%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Key%20Catalogs%20in%20S32K344%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2268254%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%20that%20function%20si%20defined%20by%20myself.%3CBR%20%2F%3EI%20report%20the%20definition.%20The%20code%20of%20the%20function%20is%20in%20the%20attached%20file.%20Thank%20you%3CBR%20%2F%3EThe%20%3CSTRONG%3EHSE_ECC_ComputeSecretAndSetAes%3C%2FSTRONG%3E%20function%20orchestrates%20the%20secure%20key%20exchange%20protocol.%20It%20first%20imports%20the%20external%20Peer%20Public%20Key%20into%20the%20HSE%20secure%20memory.%20Subsequently%2C%20it%20triggers%20the%20ECDH%20(Elliptic%20Curve%20Diffie-Hellman)%20algorithm%20to%20calculate%20a%20Shared%20Secret%20using%20the%20device's%20internal%20private%20key.%20Finally%2C%20it%20derives%20a%20usable%20128-bit%20AES%20Session%20Key%20from%20this%20secret%2C%20which%20remains%20locked%20inside%20the%20HSE%20for%20secure%20data%20encryption%20and%20decryption.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E