[3.0.0]
Changed
- Refactored crypto HAL.
- Refactored
trezor_cryptoHAL. - Reworked handling of pairing keys:
- All default pairing keys for slot 0 are now available from
libtropic_common.h. As a result, a dependency on Pythoncryptographypackage was removed. - Keys for other slots (that are used by examples and tests) are defined only in examples/tests that need them.
provisioning_data/moved totropic01_model/, as they are not needed anymore when not working with the model.
- All default pairing keys for slot 0 are now available from
tropic01_model/: don't compile unsupported examples.- Moved crypto HAL code outside of
hal/crypto/tocal/and started reffering to crypto HAL as CAL (Crypto Abstraction Layer). - Refactored compilation of CALs and supported crypto libraries (details in the Add to an Existing Project section of the libtropic documentation):
- Libtropic can be built as a static library without CALs or crypto libraries (replaced compile-time crypto type macros with runtime polymorphism using the
crypto_ctxvoid pointer contained inlt_l3_state_t). - Crypto libraries are no longer in the
vendor/directory (besides copy oftrezor_crypto/for quick testing purposes). Providing the crypto library is now the consumer's responsibility. - CAL API was refactored to be compatible with the new
crypto_ctxstructure. - For testing purposes, quick switching of supported crypto libraries was implemented in the
tropic01_model/CMake project.
- Libtropic can be built as a static library without CALs or crypto libraries (replaced compile-time crypto type macros with runtime polymorphism using the
- Moved contents of
hal/port/intohal/. - Moved TCP and USB dongle port into
hal/posix/. - Moved Linux SPI port into
hal/linux/. - Refactored platform HAL compilation.
- Renamed
lt_dev_stm32_nucleo_f439zitolt_dev_stm32_nucleo_f439zi_t. - Added sections Supported Host Platforms and Supported Cryptographic Functionality Providers into Other section in the Libtropic documentation.
- Added dependencies on micro-ecc and ed25519 repositories in functional tests (for verification of signatures calculated by TROPIC01).
- Updated L3 result values according to Application FW 1.1.0:
- Renaming of
lt_ret_tvalues:LT_L3_PAIRING_KEY_EMPTYtoLT_L3_SLOT_EMPTY.LT_L3_PAIRING_KEY_INVALIDtoLT_L3_SLOT_INVALID.LT_L3_ECC_INVALID_KEYtoLT_L3_INVALID_KEY.LT_L3_R_MEM_DATA_WRITE_WRITE_FAILtoLT_L3_SLOT_NOT_EMPTY.LT_L3_R_MEM_DATA_WRITE_SLOT_EXPIREDtoLT_L3_SLOT_EXPIRED.LT_L3_MCOUNTER_UPDATE_UPDATE_ERRtoLT_L3_UPDATE_ERR.
- Renaming of
- Renamed
LT_L2_STATUS_NOT_RECOGNIZEDtoLT_L2_STATUS_UNKNOWN. lt_l3_decrypt_response()returnsLT_L3_RESULT_UNKNOWNinstead ofLT_FAILif the L3 result value is unknown.- Moved
LT_ASANCMake option from Libtropic's CMakeLists.txt to the model's CMakeLists.txt. - Renamed
LT_STRICT_COMP_FLAGStoLT_STRICT_COMPILATION, moved it from Libtropic's CMakeLists.txt to the model's CMakeLists.txt and set it ON by default. - TCP HAL: removed
rng_seedfromstruct lt_dev_posix_tcp_t. In the case of the TROPIC01 model, the PRNG is seeded intropic01_model/main.c. - Linux SPI HAL: remove
rng_seedfromstruct lt_dev_linux_spi_tand usegetrandom()inlt_port_random_bytes(). - POSIX USB Dongle HAL: remove
rng_seedfromstruct lt_dev_posix_usb_dongle_tand usegetentropy()inlt_port_random_bytes(). - STM32 F439ZI HAL: Removed the RNG initialization, now it is the user's responsibility.
- STM32 F439ZI HAL: Changed
rng_handletype inlt_dev_stm32_nucleo_f439zi_tto a pointer (RNG_HandleTypeDef*). - New return value
LT_REBOOT_UNSUCCESSFULreturned bylt_rebootfunction, which now checks if TROPIC01 is in correct mode after the reboot. - Examples: Refactored and cleaned up
lt_ex_show_chip_id_and_fwverandlt_ex_fw_updatelogic to use the new version of thelt_rebootfunction. - Meaning of
lt_tr01_mode_tenum values. Now, this enum is supposed to be used with the newlt_get_tr01_modefunction. - CMake: Renamed
LT_CPU_FW_VERSIONtoLT_CPU_FW_UPDATE_DATA_VERto make it more clear that it is used for the FW version to update to.
Added
- Possibility to measure test coverage with the TROPIC01 model.
- Documentation: section Default Pairing Keys for a Secure Channel Handshake in Get Started
- GitHub action to run examples against TROPIC01 model (only the supported ones).
- Replaced
TR01_L3_RES_SIZE_SIZEandTR01_L3_CMD_SIZE_SIZEwithTR01_L3_SIZE_SIZE. - Renamed
TR01_L3_CYPHERTEXT_MAX_SIZEtoTR01_L3_CIPHERTEXT_MAX_SIZE. - Renamed
LT_L2_DATA_LEN_ERRORtoLT_L2_RSP_LEN_ERROR. - New generic size macros:
TR01_L3_RESULT_SIZE,TR01_L3_CMD_CIPHERTEXT_MAX_SIZE,TR01_L3_RES_CIPHERTEXT_MAX_SIZE. - Size macros for L3 results.
- New return values (
lt_ret_t):LT_L3_RES_SIZE_ERROR,LT_L3_BUFFER_TOO_SMALL. - L3 buffer size check to
lt_initand internal functions. - Finished interrupt pin support:
- In HALs that don't support it, raise compilation error.
- Implement support in Unix SPI HAL.
- Support for MbedTLS v4 crypto backend.
enum lt_ret_t:LT_L3_RESULT_UNKNOWNfor unknown L3 result values from TROPIC01.LT_L3_HARDWARE_FAILto reflect the new L3 result value from TROPIC01.
- HAL port for Arduino framework.
lt_get_tr01_modefunction to get current mode (lt_tr01_mode_t) of TROPIC01. This function is a replacement forlt_update_mode.
Fixed
lt_ex_show_chip_id_and_fwver: reboot back to Application mode in the end.- Compilation if
LT_USE_INT_PINis set from CMake. - TROPIC01 Model: apply ASan to libtropic if
LT_ASANis defined.
Removed
TR01_L3_ID_SIZE(redundant toTR01_L3_CMD_ID_SIZE).- Functions
lt_ecc_ecdsa_sig_verify()andlt_ecc_eddsa_sig_verify().- Reason: They don't use any TROPIC01's functionality and are an unneccessary wrapper.
- Consequences:
- CAL was simplified, there are less requirements on CFP (ECDSA and EdDSA not required from now).
- Libtropic's dependency on ed25519 was removed.
- Signature verification was removed from the HW wallet example.
- Users should verify the signatures themselves e.g., using functions provided by their crypto library.
lt_update_modefunction.