Expected to be used by an application when using separate calls for L3 data out and L3 data in. More...
Files | |
| file | libtropic_l3.h |
| Layer 3 functions declarations. | |
Functions | |
| lt_ret_t | lt_out__session_start (lt_handle_t *h, const lt_pkey_index_t pkey_index, lt_host_eph_keys_t *host_eph_keys) |
| Initiates secure session. | |
| lt_ret_t | lt_in__session_start (lt_handle_t *h, const uint8_t *stpub, const lt_pkey_index_t pkey_index, const uint8_t *shipriv, const uint8_t *shipub, lt_host_eph_keys_t *host_eph_keys) |
| Decodes TROPIC01's response during secure session's establishment. | |
| lt_ret_t | lt_out__ping (lt_handle_t *h, const uint8_t *msg_out, const uint16_t msg_len) |
| Encodes Ping command payload. | |
| lt_ret_t | lt_in__ping (lt_handle_t *h, uint8_t *msg_in, const uint16_t msg_len) |
| Decodes Ping result payload. | |
| lt_ret_t | lt_out__pairing_key_write (lt_handle_t *h, const uint8_t *pairing_pub, const uint8_t slot) |
| Encodes Pairing_Key_Write command payload. | |
| lt_ret_t | lt_in__pairing_key_write (lt_handle_t *h) |
| Decodes Pairing_Key_Write result payload. | |
| lt_ret_t | lt_out__pairing_key_read (lt_handle_t *h, const uint8_t slot) |
| Encodes Pairing_Key_Read command payload. | |
| lt_ret_t | lt_in__pairing_key_read (lt_handle_t *h, uint8_t *pubkey) |
| Decodes Pairing_Key_Read result payload. | |
| lt_ret_t | lt_out__pairing_key_invalidate (lt_handle_t *h, const uint8_t slot) |
| Encodes Pairing_Key_Invalidate command payload. | |
| lt_ret_t | lt_in__pairing_key_invalidate (lt_handle_t *h) |
| Decodes Pairing_Key_Invalidate result payload. | |
| lt_ret_t | lt_out__r_config_write (lt_handle_t *h, const enum lt_config_obj_addr_t addr, const uint32_t obj) |
| Encodes R_Config_Write command payload. | |
| lt_ret_t | lt_in__r_config_write (lt_handle_t *h) |
| Decodes R_Config_Write result payload. | |
| lt_ret_t | lt_out__r_config_read (lt_handle_t *h, const enum lt_config_obj_addr_t addr) |
| Encodes R_Config_Read command payload. | |
| lt_ret_t | lt_in__r_config_read (lt_handle_t *h, uint32_t *obj) |
| Decodes R_Config_Read result payload. | |
| lt_ret_t | lt_out__r_config_erase (lt_handle_t *h) |
| Encodes R_Config_Erase command payload. | |
| lt_ret_t | lt_in__r_config_erase (lt_handle_t *h) |
| Decodes R_Config_Erase result payload. | |
| lt_ret_t | lt_out__i_config_write (lt_handle_t *h, const enum lt_config_obj_addr_t addr, const uint8_t bit_index) |
| Encodes I_Config_Write command payload. | |
| lt_ret_t | lt_in__i_config_write (lt_handle_t *h) |
| Decodes I_Config_Write result payload. | |
| lt_ret_t | lt_out__i_config_read (lt_handle_t *h, const enum lt_config_obj_addr_t addr) |
| Encodes I_Config_Read command payload. | |
| lt_ret_t | lt_in__i_config_read (lt_handle_t *h, uint32_t *obj) |
| Decodes I_Config_Read result payload. | |
| lt_ret_t | lt_out__r_mem_data_write (lt_handle_t *h, const uint16_t udata_slot, const uint8_t *data, const uint16_t data_size) |
| Encodes R_Mem_Data_Write command payload. | |
| lt_ret_t | lt_in__r_mem_data_write (lt_handle_t *h) |
| Decodes R_Mem_Data_Write result payload. | |
| lt_ret_t | lt_out__r_mem_data_read (lt_handle_t *h, const uint16_t udata_slot) |
| Encodes R_Mem_Data_Read command payload. | |
| lt_ret_t | lt_in__r_mem_data_read (lt_handle_t *h, uint8_t *data, const uint16_t data_max_size, uint16_t *data_read_size) |
| Decodes R_Mem_Data_Read result payload. | |
| lt_ret_t | lt_out__r_mem_data_erase (lt_handle_t *h, const uint16_t udata_slot) |
| Encodes R_Mem_Data_Erase command payload. | |
| lt_ret_t | lt_in__r_mem_data_erase (lt_handle_t *h) |
| Decodes R_Mem_Data_Erase result payload. | |
| lt_ret_t | lt_out__random_value_get (lt_handle_t *h, const uint16_t rnd_bytes_cnt) |
| Encodes Random_Value_Get command payload. | |
| lt_ret_t | lt_in__random_value_get (lt_handle_t *h, uint8_t *rnd_bytes, const uint16_t rnd_bytes_cnt) |
| Decodes Random_Value_Get result payload. | |
| lt_ret_t | lt_out__ecc_key_generate (lt_handle_t *h, const lt_ecc_slot_t slot, const lt_ecc_curve_type_t curve) |
| Encodes ECC_Key_Generate command payload. | |
| lt_ret_t | lt_in__ecc_key_generate (lt_handle_t *h) |
| Decodes ECC_Key_Generate result payload. | |
| lt_ret_t | lt_out__ecc_key_store (lt_handle_t *h, const lt_ecc_slot_t slot, const lt_ecc_curve_type_t curve, const uint8_t *key) |
| Encodes ECC_Key_Store command payload. | |
| lt_ret_t | lt_in__ecc_key_store (lt_handle_t *h) |
| Decodes ECC_Key_Store result payload. | |
| lt_ret_t | lt_out__ecc_key_read (lt_handle_t *h, const lt_ecc_slot_t slot) |
| Encodes ECC_Key_Read command payload. | |
| lt_ret_t | lt_in__ecc_key_read (lt_handle_t *h, uint8_t *key, const uint8_t key_max_size, lt_ecc_curve_type_t *curve, lt_ecc_key_origin_t *origin) |
| Decodes ECC_Key_Read result payload. | |
| lt_ret_t | lt_out__ecc_key_erase (lt_handle_t *h, const lt_ecc_slot_t slot) |
| Encodes ECC_Key_Erase command payload. | |
| lt_ret_t | lt_in__ecc_key_erase (lt_handle_t *h) |
| Decodes ECC_Key_Erase result payload. | |
| lt_ret_t | lt_out__ecc_ecdsa_sign (lt_handle_t *h, const lt_ecc_slot_t slot, const uint8_t *msg, const uint32_t msg_len) |
| Encodes ECDSA_Sign command payload. | |
| lt_ret_t | lt_in__ecc_ecdsa_sign (lt_handle_t *h, uint8_t *rs) |
| Decodes ECDSA_Sign result payload. | |
| lt_ret_t | lt_out__ecc_eddsa_sign (lt_handle_t *h, const lt_ecc_slot_t ecc_slot, const uint8_t *msg, const uint16_t msg_len) |
| Encodes EDDSA_Sign command payload. | |
| lt_ret_t | lt_in__ecc_eddsa_sign (lt_handle_t *h, uint8_t *rs) |
| Decodes EDDSA_Sign result payload. | |
| lt_ret_t | lt_out__mcounter_init (lt_handle_t *h, const enum lt_mcounter_index_t mcounter_index, const uint32_t mcounter_value) |
| Encodes MCounter_Init command payload. | |
| lt_ret_t | lt_in__mcounter_init (lt_handle_t *h) |
| Decodes MCounter_Init command result payload. | |
| lt_ret_t | lt_out__mcounter_update (lt_handle_t *h, const enum lt_mcounter_index_t mcounter_index) |
| Encodes MCounter_Update command payload. | |
| lt_ret_t | lt_in__mcounter_update (lt_handle_t *h) |
| Decodes MCounter_Update result payload. | |
| lt_ret_t | lt_out__mcounter_get (lt_handle_t *h, const enum lt_mcounter_index_t mcounter_index) |
| Encodes MCounter_Get command payload. | |
| lt_ret_t | lt_in__mcounter_get (lt_handle_t *h, uint32_t *mcounter_value) |
| Decodes MCounter_Get result payload. | |
| lt_ret_t | lt_out__mac_and_destroy (lt_handle_t *h, lt_mac_and_destroy_slot_t slot, const uint8_t *data_out) |
| Encodes MAC_And_Destroy command payload. | |
| lt_ret_t | lt_in__mac_and_destroy (lt_handle_t *h, uint8_t *data_in) |
| Decodes MAC_And_Destroy result payload. | |
This module provides functions for separate L3 communication with TROPIC01. Function prepended with 'lt_out__' are used to prepare data for sending to TROPIC01, while functions prepended with 'lt_in__' are used to decode data received from TROPIC01.
Sending and receiving data is done through L2 layer, which is not covered by this module and user is expected to call lt_l2_send() at the point when data is ready to be sent to TROPIC01.
For more information have a look into libtropic.c, how separate calls are used in a single call.