MbedTLS v.1.2 handshake

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

MbedTLS v.1.2 handshake

74 Views
MohitGediya
Contributor II

I want to offload TLS v.1.2 handshake process to SE052 Secure element IC from host ESP32c3devkitm.
It is act as server, which is v.3.7.0 zephyr based sample application.
There is no support is added in module to offload whole cryptographic operations to SE.

I go though "SE05x IoT applet APDU Specification". Using this document, I was thinking i can create wrapper function using APDU commands. Which is working based on directly perform operation on SE052.

There is Understanding gap for certificate stores.
If I store CA certificate or server certificate inside SE052, than how it will become part of TLS handshake using SE052 ICs.

If I will not stores it inside SE052 than how to add support for TLS handshake process.(Whole handshake process is offloaded to SE052).

What approach should I use to handshake offloads to SE052 from host controller.
What maximum operations can i performs.
I can create wrapper function for possible each process. 

@Kan @kan_li


Tags (1)
0 Kudos
Reply
1 Reply

16 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @MohitGediya ,

 

No—you should not design this as a full TLS 1.2 handshake offload to SE052. The host TLS stack may use SE05x/SE052 as a secure crypto co-processor , but not as a standalone TLS engine that owns the complete TLS protocol state machine. The host MCU/RTOS still runs mbedTLS/Zephyr TLS, parses and builds handshake messages, manages certificate exchange/validation flow, and uses the secure element for selected cryptographic operations and secure credential storage such as :

random generation, ECDH/ECDHE-related secret derivation, and ECDSA or RSA sign/verify/decrypt depending on configuration and key type.

 

For your questions:

1)If I store CA certificate or server certificate inside SE052, than how it will become part of TLS handshake using SE052 ICs.

It becomes part of the handshake only after the host retrieves or associates that certificate with the TLS stack . The middleware example shows the certificate being read from the SE, parsed on the host, and then used by mbedTLS; the private key remains referenced inside the SE for sign/ECDH operations.

For CA certificates specifically, the common architecture is that the host uses the CA certificate to verify the peer certificate chain.

2) If I will not stores it inside SE052 than how to add support for TLS handshake process.

You can still do the handshake normally by:

  • keeping the certificate chain in host memory/flash
  • loading it into mbedTLS on the host
  • keeping only the private key in SE052 and associating it as a reference key for sign/ECDH operations

 

Hope that makes sense,

 

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
%3CLINGO-SUB%20id%3D%22lingo-sub-2374365%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMbedTLS%20v.1.2%20handshake%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2374365%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20want%20to%20offload%20TLS%20v.1.2%20handshake%20process%20to%20SE052%20Secure%20element%20IC%20from%20host%20ESP32c3devkitm.%3CBR%20%2F%3EIt%20is%20act%20as%20server%2C%20which%20is%20v.3.7.0%20zephyr%20based%20sample%20application.%3CBR%20%2F%3EThere%20is%20no%20support%20is%20added%20in%20module%20to%20offload%20whole%20cryptographic%20operations%20to%20SE.%3C%2FP%3E%3CP%3EI%20go%20though%20%22SE05x%20IoT%20applet%20APDU%20Specification%22.%20Using%20this%20document%2C%20I%20was%20thinking%20i%20can%20create%20wrapper%20function%20using%20APDU%20commands.%20Which%20is%20working%20based%20on%20directly%20perform%20operation%20on%20SE052.%3CBR%20%2F%3E%3CBR%20%2F%3EThere%20is%20Understanding%20gap%20for%20certificate%20stores.%3CBR%20%2F%3EIf%20I%20store%20CA%20certificate%20or%20server%20certificate%20inside%20SE052%2C%20than%20how%20it%20will%20become%20part%20of%20TLS%20handshake%20using%20SE052%20ICs.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20I%20will%20not%20stores%20it%20inside%20SE052%20than%20how%20to%20add%20support%20for%20TLS%20handshake%20process.(Whole%20handshake%20process%20is%20offloaded%20to%20SE052).%3CBR%20%2F%3E%3CBR%20%2F%3EWhat%20approach%20should%20I%20use%20to%20handshake%20offloads%20to%20SE052%20from%20host%20controller.%3CBR%20%2F%3EWhat%20maximum%20operations%20can%20i%20performs.%3CBR%20%2F%3EI%20can%20create%20wrapper%20function%20for%20possible%20each%20process.%26nbsp%3B%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%3E%40Kan_Li%3C%2Fa%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E