Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
NUCLEO_F756ZG/mbedtls: Add hw acceleration for SHA256 #4162
Enable HW acceleration for SHA256 algorithm on STM32F756ZG
Steps to test or reproduce
To test this feature, you have to modify TESTS/mbedtls/selfttest/main.cpp in order to call sha256 self test:
The code is looking good, but I have a few comments:
- The error codes from the hardware accelerator are not always checked. This is probably because the mbed TLS API itself doesnt actually have return code, meaning that is quite difficult to signal errors to the user. However, I think that for now we can add comments in the relevant places so it is easier to modify the code once return codes are available.
- What are the requirements of this code in terms of thread safety? At the moment it looks like there isnt any and the clone function probably creates more problems regarding this.
- I am slightly confused about checks for multiples of 4 in some places.