MbedTLS Server connection with client using SE052

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

MbedTLS Server connection with client using SE052

319 Views
MohitGediya
Contributor II

Hardware setup:
Board SoC: ESP32C3devkitm board and IC is SE052F2HN2Z019HJ.

Now i use nano plug and trust module's "se05x_mbedtls_alt_testexample.
Flash in board. But i face issue to verify "plugandtrust: Error in mbedtls_pk_verify. ret = -19968".

I change both key as per document of SE052. In my code.

Here is full sample application. Please verify it and suggest me the change that i need to fix.
Also give valid informative document about this so, i can explore more features of it.
And also,
I want to create TCP zephyr server based sample application. for that what informations i can store inside SE052 IC(this ic)? Which is use for cryptographic operation.
Which api and steps i need to follow to send encrypted data to client and client will decrypt the data.(client is other same setup board).
Which type of algorithm should i use for mbedTLS.

@Kan @Kan_Li @tseco  

     

 
uint8_t scp03_enc_key[16] = {0x3a, 0xe4, 0x41, 0xc7, 0x47, 0xe3, 0x2e, 0xbc, 0x16, 0xb3, 0xbb, 0x2d, 0x84, 0x3c, 0x6d, 0xd8};
uint8_t scp03_mac_key[16] = {0x6c, 0x18, 0xf3, 0xd0, 0x8f, 0xee, 0x1c, 0xb9, 0x6a, 0x3c, 0x8d, 0xe5, 0xd3, 0x53, 0x8a, 0xaa};
Tags (1)
0 Kudos
Reply
7 Replies

211 Views
MohitGediya
Contributor II
0 Kudos
Reply

211 Views
MohitGediya
Contributor II

@carlos_o 

Please give reply

0 Kudos
Reply

237 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @MohitGediya ,

 

Is it possible to have the APDU log out of the test when you run "se05x_mbedtls_alt_testexample? 

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

232 Views
MohitGediya
Contributor II

Here is logs.
@Kan_Li 

0 Kudos
Reply

209 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @MohitGediya ,

 

Thanks for the info! I have shared with the SW team for review, and will let you know when I have any feedback from there.

 

Thanks for your patience!

 

Best Regards,

Kan

0 Kudos
Reply

104 Views
MohitGediya
Contributor II

How software team will connects for this with me

0 Kudos
Reply

28 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @MohitGediya ,

 

I will be the contact window and let you know when there is any progress on this issue.

 

Best Regards,

Kan

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2370197%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMbedTLS%20Server%20connection%20with%20client%20using%20SE052%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2370197%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHardware%20setup%3A%3CBR%20%2F%3EBoard%20SoC%3A%20ESP32C3devkitm%20board%20and%20IC%20is%20SE052F2HN2Z019HJ.%3C%2FP%3E%3CP%3ENow%20i%20use%20nano%20plug%20and%20trust%20module's%20%3CSTRONG%3E%22%3CU%3Ese05x_mbedtls_alt_test%3C%2FU%3E%22%26nbsp%3B%3C%2FSTRONG%3Eexample.%3CBR%20%2F%3EFlash%20in%20board.%20But%20i%20%3CU%3E%3CSTRONG%3Eface%20issue%3C%2FSTRONG%3E%3C%2FU%3E%20to%20verify%20%3CSTRONG%3E%22%3C%2FSTRONG%3E%3CSTRONG%3E%3CU%3Eplugandtrust%3A%20Error%20in%20mbedtls_pk_verify.%20ret%20%3D%20-19968%3C%2FU%3E%22.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EI%20change%20both%20key%20as%20per%20document%20of%20SE052.%20In%20my%20code.%3C%2FP%3E%3CP%3EHere%20is%20full%20sample%20application.%20Please%20verify%20it%20and%20suggest%20me%20the%20change%20that%20i%20need%20to%20fix.%3CBR%20%2F%3EAlso%20give%20valid%20informative%20document%20about%20this%20so%2C%20i%20can%20explore%20more%20features%20of%20it.%3CBR%20%2F%3EAnd%20also%2C%3CBR%20%2F%3EI%20want%20to%20create%20TCP%20zephyr%20server%20based%20sample%20application.%20for%20that%20what%20informations%20i%20can%20store%20inside%20SE052%20IC(this%20ic)%3F%20Which%20is%20use%20for%20cryptographic%20operation.%3CBR%20%2F%3EWhich%20api%20and%20steps%20i%20need%20to%20follow%20to%20send%20encrypted%20data%20to%20client%20and%20client%20will%20decrypt%20the%20data.(client%20is%20other%20same%20setup%20board).%3CBR%20%2F%3EWhich%20type%20of%20algorithm%20should%20i%20use%20for%20mbedTLS.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F38145%22%20target%3D%22_blank%22%3E%40Kan%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F59276%22%20target%3D%22_blank%22%3E%40Kan_Li%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F46854%22%20target%3D%22_blank%22%3E%40tseco%3C%2FA%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Euint8_t%3C%2FSPAN%3E%20%3CSPAN%3Escp03_enc_key%3C%2FSPAN%3E%3CSPAN%3E%5B%3C%2FSPAN%3E%3CSPAN%3E16%3C%2FSPAN%3E%3CSPAN%3E%5D%20%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3E%7B%3C%2FSPAN%3E%3CSPAN%3E0x3a%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3E0xe4%3C%2FSPAN%3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3ERe%3A%20MbedTLS%20Server%20connection%20with%20client%20using%20SE052%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2371750%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%2F262552%22%20target%3D%22_blank%22%3E%40MohitGediya%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThanks%20for%20the%20info!%20I%20have%20shared%20with%20the%20SW%20team%20for%20review%2C%20and%20will%20let%20you%20know%20when%20I%20have%20any%20feedback%20from%20there.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThanks%20for%20your%20patience!%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20Regards%2C%3C%2FP%3E%0A%3CP%3EKan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2371739%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MbedTLS%20Server%20connection%20with%20client%20using%20SE052%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2371739%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F241501%22%20target%3D%22_blank%22%3E%40carlos_o%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20give%20reply%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2371737%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MbedTLS%20Server%20connection%20with%20client%20using%20SE052%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2371737%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EPlease%20give%20reply%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F59276%22%20target%3D%22_blank%22%3E%40Kan_Li%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FSmart-Cards-and-Secure-Element%2FRequest-for-AES-GCM-Example-with-SE052F%2Fm-p%2F2197350%23U2197350%22%20class%3D%22lia-mention-container-editor-message%20lia-img-icon-forum-thread%20lia-fa-icon%20lia-fa-forum%20lia-fa-thread%20lia-fa%22%20target%3D%22_blank%22%3ERequest%20for%20AES-GCM%20Example%20with%20SE052F%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2371248%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MbedTLS%20Server%20connection%20with%20client%20using%20SE052%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2371248%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHere%20is%20logs.%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F59276%22%20target%3D%22_blank%22%3E%40Kan_Li%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2371153%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MbedTLS%20Server%20connection%20with%20client%20using%20SE052%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2371153%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%2F262552%22%20target%3D%22_blank%22%3E%40MohitGediya%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EIs%20it%20possible%20to%20have%20the%20APDU%20log%20out%20of%20the%20test%20when%20you%20run%26nbsp%3B%3CSTRONG%3E%22%3CU%3Ese05x_mbedtls_alt_test%3C%2FU%3E%22%26nbsp%3B%3C%2FSTRONG%3E%3CSPAN%3Eexample%3F%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHave%20a%20great%20day%2C%3CBR%20%2F%3EKan%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3ENote%3A%3CBR%20%2F%3E-%20If%20this%20post%20answers%20your%20question%2C%20please%20click%20the%20%22Mark%20Correct%22%20button.%20Thank%20you!%3CBR%20%2F%3E-%20We%20are%20following%20threads%20for%207%20weeks%20after%20the%20last%20post%2C%20later%20replies%20are%20ignored%3CBR%20%2F%3EPlease%20open%20a%20new%20thread%20and%20refer%20to%20the%20closed%20one%2C%20if%20you%20have%20a%20related%20question%20at%20a%20later%20point%20in%20time.%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2374168%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MbedTLS%20Server%20connection%20with%20client%20using%20SE052%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2374168%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHow%20software%20team%20will%20connects%20for%20this%20with%20me%3C%2FP%3E%3C%2FLINGO-BODY%3E