Hi,
This design addressing to share the code of the common crypto primitives(SHA256, RSA, later AES) between MCUboot and runtime SPE. The goal is to reduce the flash footprint of SPE.
Design proposal: https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/4587
Implementation: https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/4583/
TL;DR: SPE binary size can be reduced with 10KB. If image encryption will be turned on then ~12-13KB is the gain. Please let us know if you think this improvements would be useful.
@Thomas Törnblommailto:thomas.tornblom@iar.com: Could you check the porting to IAR toolchain?
BR, Tamas Ban