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

Layer 3 transfer functions declarations. More...

#include "libtropic_common.h"
Include dependency graph for lt_l3_process.h:

Macros

Common L3 Command result codes

L3 Command result codes used by all commands.

#define TR01_L3_RESULT_OK   0xC3
 L3 Command executed successfully.
 
#define TR01_L3_RESULT_FAIL   0x3C
 Generic L3 command failure.
 
#define TR01_L3_RESULT_UNAUTHORIZED   0x01
 Unauthorized access.
 
#define TR01_L3_RESULT_INVALID_CMD   0x02
 Invalid or unsupported L3 command identifier.
 
Specific L3 Command result codes

L3 Command result codes specific to only some of the commands.

#define TR01_L3_RESULT_SLOT_NOT_EMPTY   0x10
 The target slot is not empty when expected to be.
 
#define TR01_L3_RESULT_SLOT_EXPIRED   0x11
 The target FLASH slot has expired.
 
#define TR01_L3_RESULT_INVALID_KEY   0x12
 The key in selected slot is invalid or corrupted.
 
#define TR01_L3_RESULT_UPDATE_ERR   0x13
 Update operation failed (i.e. mcounter done).
 
#define TR01_L3_RESULT_COUNTER_INVALID   0x14
 The counter is disabled or has failed.
 
#define TR01_L3_RESULT_SLOT_EMPTY   0x15
 The requested slot is empty and contains no valid data.
 
#define TR01_L3_RESULT_SLOT_INVALID   0x16
 The slot content is invalidated.
 
#define TR01_L3_RESULT_HARDWARE_FAIL   0x17
 A hardware error occurred during a write operation.
 

Functions

lt_ret_t lt_l3_encrypt_request (lt_l3_state_t *s3)
 Encrypts content of L3 buffer and fills it with cyphertext ready to be sent to TROPIC01.
 
lt_ret_t lt_l3_decrypt_response (lt_l3_state_t *s3)
 Decrypts response from TROPIC01 and fills L3 buffer with decrypted data.
 
void lt_l3_invalidate_host_session_data (lt_l3_state_t *s3)
 Invalidates host's session data.
 

Detailed Description

License
For the license see file LICENSE.txt file in the root directory of this source tree.