Libtropic API
SDK for the TROPIC01 secure element
Version: master (latest)
Loading...
Searching...
No Matches

◆ lt_ex_hello_world_separate_API()

int lt_ex_hello_world_separate_API ( lt_handle_t h)

This example shows how to use separated API calls with TROPIC01. Separate calls are named lt_out__* and lt_in__* and they provide splitting of the commands/results, which might be used for example for communication over a tunnel. Let's say we want to speak with TROPIC01 from a server, then lt_out__* part is done on the server, then encrypted payload is transferred over tunnel to the point where SPI is wired to TROPIC01. L2 communication is executed, encrypted result is transferred back to the server, where lt_in__* function is used to decrypt the response.

To have a better understanding have a look into lt_ex_hello_world.c, both examples shows similar procedure.

This might be used for example in production, where we want to establish a secure channel between HSM and TROPIC01 on PCB.

Parameters
hHandle for communication with TROPIC01. It is assumed that the h.l2.device and h.l3.crypto_ctx members were already initialized. Because these members are pointers, the assigned structures must exist throughout the whole life-cycle of the handle. Refer to the 'Get Started'->'Integrating Libtropic'->'How to Use' Section in the Libtropic documentation for more information.
Return values
0Function executed successfully
-1Function did not execute successfully