[3.1.0]
Changed
- Merged all Libtropic platform repositories into this main Libtropic repository.
- Examples and functional tests are no longer part of the core Libtropic (related CMake options were removed from Libtropic's
CMakeLists.txt) - they are now standalone CMake projects. Note that we provide the tests just for a reference and executing them is at user's risk, as they can cause irreversible changes to the TROPIC01 chip. examples/: contains platform directories, where Chip Identification, FW Update and Hello, World! standalone example projects are always implemented for each platform (except the TROPIC01 Model). Each platform may contain additional example projects.- HW Wallet, Mac-And-Destroy and Separate API examples are now implemented only for the TROPIC01 Model (
examples/model/). tests/functional/: containssrc/, where the functional tests CMake project is implemented and platform directories with entry points for each target.- Restructured documentation, it is now generated only for release versions, added Tutorials section to help users quickly get started with Libtropic on supported platforms.
- Examples and functional tests are no longer part of the core Libtropic (related CMake options were removed from Libtropic's
- STM32 HAL: updated L432KC and started active support again.
- STM32 HAL: moved clock initialization out of the HALs to remove dependency on user's
main.hand allow for higher flexibility.- Clock initialization is up to the user now and it is demonstrated in our integration examples.
- Logging: Changed handling of newlines. In the main code base, we now use line feed (LF,
\n). Refer to your platform's documentation
about if and how the LF is translated automatically (e.g.,stdio.himplementation of major desktop platforms) or if you
need to modify the behavior yourself (e.g., by modifiying_writesyscall on STM32), or (in the case of the embedded platforms)
you just need to configure your serial monitor correctly, so it expects only LF character (and not CR+LF pair). - TCP HAL: Fixed
lt_port_init()cleanup, refactored local functions. - Moved TROPIC01 Model related files to
scripts/tropic01_model/.
Added
- Logging:
lt_port_logfunction for platform-specific logging mechanism; is used by the logging macros declared inlibtropic_logging.h. - CAL:
lt_sha256_deinitfunction to deinitialize the SHA-256 context. It is called after the SHA-256 operation is finalized, so it must do an exhaustive cleanup. - ESP-IDF HAL for Espressif SoCs.
- Missing secure memory zeroing to
lt_in__session_start()andlt_hkdf()(internal function). - Missing check of
lt_handle_t.l3.session_statusinlt_in__ecc_key_generate(). - CAL: support for OpenSSL.
- CAL: support for WolfCrypt.
- Linux HAL: added new experimental HAL for Linux which utilizes spidev for chip select instead of GPIO.
- Linux USB Devkit: added full chain verification example with tutorial.
- ESP32: added examples and functional tests support for ESP32-DevKitC-V4, ESP32-S3-DevKitC-1 and ESP32-C3-DevKit-RUST-1.
Fixed
lt_print_bytesfunction now returnsLT_PARAM_ERRwhen incorrect parameters are passed instead ofLT_FAIL.lt_print_fw_headerfunction now returnsLT_PARAM_ERRwhen incorrect bank ID is used instead ofLT_FAIL.- Linux SPI HAL: If SPI mode 0 is not supported, cleanup and return with an error.
- If
lt_init()fails, it performs the needed cleanup itself -> the user should calllt_deinit()only afterlt_init()succeeds.
Removed
- Logging: Redundant/unused macros
LT_LOG,LT_LOG_RESULT,LT_LOG_VALUE. - Arduino HAL: Removed
rng_seedfromlt_dev_arduino_t, as it should be user's responsibility to initialize the PRNG. - Arduino HAL: Removed
SPI.begin()andSPI.end()calls (fixes this issue). It is now expected that users initialize SPI in their code themselves. - Redundant checks of
lt_handle_t.l3.session_statusinlt_l3_encrypt_request()andlt_l3_decrypt_response(). - Legacy internal scripts in
scripts/test_runner/.