mbedtls: improve debug output and fix AES-ICM issues#793
Conversation
a2192e0 to
e8441a8
Compare
3357061 to
ff42e7c
Compare
584c295 to
8f88503
Compare
|
I am still unsure if you would like to try and merge this or have it as a local fix only? |
Based on this comment Mbed-TLS/TF-PSA-Crypto#711 (comment) the bug is on the MbedTLS side. I figured it out why the code works on Ubuntu while doesn't on Zephyr and fixed the issue. The fact is somewhere in the code two micros are defined differently for Zephyr and Ubuntu. For example, So, we have two options
|
|
I would personally go for option 2 if there is no actual need for this code now, mostly to avoid maintaining special case handling. |
- aes_gcm: Add debug print when PSA status fails. - aes_icm: Destroy previous key before importing new key. - aes_icm: Add missing destination buffer argument to encrypt function. Signed-off-by: Sayed Naser Moravej <seyednasermoravej@gmail.com>
8f88503 to
1b7ca3c
Compare
I applied the option 2. I'm handling the issue on Zephyr side with the same configurations like PC. zephyrproject-rtos/zephyr#108519 |
After testing the new libSRTP on a microcontroller with a limited resources (RAM = 256KB), I faced two issues:
https://github.com/Mbed-TLS/TF-PSA-Crypto/blob/76920edddcad00ac41b248e12d937b845df7bedb/drivers/builtin/src/cipher.c#L641