libtropic
C library for TROPIC01 chip
|
Functions with functional tests used internally for testing behaviour of TROPIC01 chip. More...
Macros | |
#define | LT_TEST_ASSERT(expected, value) |
#define | LT_TEST_ASSERT_COND(value, condition, expected_if_true, expected_if_false) |
#define | LT_FINISH_TEST() |
#define | LT_EXAMPLE_TEST_KEYS_DECLARED |
Functions | |
void | lt_assert_fail_handler (void) |
Called when LT_TEST_ASSERT or LT_TEST_ASSERT_COND fails. | |
void | hexdump_8byte (const uint8_t *data, uint16_t size) |
Non-test function to dump bytes in 8 byte rows. More... | |
int | chip_id_printf_wrapper (const char *format,...) |
Printf-like wrapper for LT_LOG_INFO used with lt_print_chip_id(). More... | |
void | lt_test_rev_eddsa_sign (lt_handle_t *h) |
Tests EDDSA_Sign command. More... | |
void | lt_test_rev_ecdsa_sign (lt_handle_t *h) |
Tests ECDSA_Sign command. More... | |
void | lt_test_ire_pairing_key_slots (lt_handle_t *h) |
Test Pairing_Key_Read, Pairing_Key_Write and Pairing_Key_Invalidate on all slots. More... | |
void | lt_test_rev_ping (lt_handle_t *h) |
Test Ping L3 command with random data of random length <= PING_LEN_MAX. More... | |
void | lt_test_rev_r_mem (lt_handle_t *h) |
Test R_Mem_Data_* commands on all User Data slots. More... | |
void | lt_test_rev_erase_r_config (lt_handle_t *h) |
Backs up R-Config, erases it and then restores it. More... | |
void | lt_test_rev_handshake_req (lt_handle_t *h) |
Test Secure Session initialization using handshake request and abortion of the Session. More... | |
void | lt_test_rev_mcounter (lt_handle_t *h) |
Test monotonic counter API - lt_mcounter_init, lt_mcounter_get, lt_mcounter_update. More... | |
void | lt_test_rev_get_info_req_app (lt_handle_t *h) |
Test Get_Info_Req command in Application mode with all possible OBJECT_ID values. More... | |
void | lt_test_rev_get_info_req_bootloader (lt_handle_t *h) |
Test Get_Info_Req command in Maintenance mode with all possible OBJECT_ID values. More... | |
void | lt_test_rev_read_i_config (lt_handle_t *h) |
Reads contents of I-Config and prints it to the log. More... | |
void | lt_test_ire_write_i_config (lt_handle_t *h) |
Tests writing the I-Config. More... | |
void | lt_test_rev_read_r_config (lt_handle_t *h) |
Reads contents of R-Config and prints it to the log. More... | |
void | lt_test_rev_resend_req (lt_handle_t *h) |
Test Resend_Req L2 request in Application and Maintenance mode. More... | |
void | lt_test_rev_sleep_req (lt_handle_t *h) |
Test Sleep_Req L2 request. More... | |
void | lt_test_rev_startup_req (lt_handle_t *h) |
Test L2 Startup Request. More... | |
void | lt_test_rev_write_r_config (lt_handle_t *h) |
Backs up R-Config, writes it and then restores it. More... | |
void | lt_test_rev_ecc_key_generate (lt_handle_t *h) |
Test ECC_Key_Generate command, along with ECC_Key_Read and ECC_Key_Erase. More... | |
void | lt_test_rev_ecc_key_store (lt_handle_t *h) |
Test ECC_Key_Store command, along with ECC_Key_Read and ECC_Key_Erase. More... | |
void | lt_test_rev_random_value_get (lt_handle_t *h) |
Tests Random_Value_Get command. More... | |
void | lt_test_rev_mac_and_destroy (lt_handle_t *h) |
Tests MAC_And_Destroy command using HMAC-SHA256 as the Key Derivation Function (KDF). More... | |
void | lt_test_rev_get_log_req (lt_handle_t *h) |
Tests Get_Log_Req command in Application and Maintenance mode. More... | |
Variables | |
lt_ret_t(* | lt_test_cleanup_function )(void) |
uint8_t | sh0priv [] |
uint8_t | sh0pub [] |
uint8_t | sh1priv [] |
uint8_t | sh1pub [] |
uint8_t | sh2priv [] |
uint8_t | sh2pub [] |
uint8_t | sh3priv [] |
uint8_t | sh3pub [] |