libtropic
C library for TROPIC01 chip
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

#define L3_RESULT_OK   0xC3u
 L3 RESULT field Value.
 
#define L3_RESULT_FAIL   0x3Cu
 L3 RESULT field Value.
 
#define L3_RESULT_UNAUTHORIZED   0x01u
 L3 RESULT field Value.
 
#define L3_RESULT_INVALID_CMD   0x02u
 L3 RESULT field Value.
 
#define L3_ECC_INVALID_KEY   0x12u
 L3 RESULT field Value returned from ecc_key_read.
 
#define L3_PAIRING_KEY_EMPTY   0x15u
 L3 RESULT field Value returned from pairing_key_read.
 
#define L3_PAIRING_KEY_INVALID   0x16u
 L3 RESULT field Value returned from pairing_key_read.
 
#define L3_R_MEM_DATA_WRITE_WRITE_FAIL   0x10
 The slot is already written in.
 
#define L3_R_MEM_DATA_WRITE_SLOT_EXPIRED   0x11
 The writing operation limit is reached for the slot.
 
#define L3_MCOUNTER_UPDATE_ERROR   0x13
 Failure to update the specified Monotonic Counter. The Monotonic Counter is already at 0.
 
#define L3_MCOUNTER_COUNTER_INVALID   0x14
 The Monotonic Counter detects an attack and is locked. The counter must be reinitialized.
 

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. More...
 
lt_ret_t lt_l3_decrypt_response (lt_l3_state_t *s3)
 Decrypts response from TROPIC01 and fills L3 buffer with decrypted data. More...
 
void lt_l3_invalidate_host_session_data (lt_l3_state_t *s3)
 Invalidates host's session data. More...
 

Detailed Description

Author
Tropic Square s.r.o.
License
For the license see file LICENSE.txt file in the root directory of this source tree.