libtropic
C library for TROPIC01 chip

◆ lt_in__session_start()

lt_ret_t lt_in__session_start ( lt_handle_t h,
const uint8_t *  stpub,
const pkey_index_t  pkey_index,
const uint8_t *  shipriv,
const uint8_t *  shipub,
session_state_t state 
)

Designed to be used together with lt_out__session_start(), lt_l2_send() and lt_l2_receive().

Note
Secure session will be established after successful execution. For more information read info at the top of this file.
Parameters
hDevice's handle
stpubSTPUB from device's certificate
pkey_indexIndex of pairing public key
shiprivSecure host private key
shipubSecure host public key
stateContent must be filled with lt_out__session_start and is used to finish secure session establishment.
Returns
LT_OK if success, otherwise returns other error code.