Question on Trust Zone performances
Hi, I’m working on a STM32L552ZEQ.
My goal is to generate a pair of RSA keys of 2048 bits using the Trust Zone.
Before start using the Trust Zone, I wrote the code to generate the RSA key pair (of 2048 bits) without the Trust Zone, and the average time for the generation is about 50 seconds (clock frequency set to 110MHZ).
After that I tried to do the same thing but this time using the Trust Zone. The configurations are the same, but with the Trust Zone enabled it takes more than 20 minutes to generate the RSA key pair.
In order to check this behaviour I wrote a simple "for loop" (with inside a malloc) and compared the execution time between the "secure" code and the "non secure" code.
The result is that the "for loop" executed inside the "secure" code is about 25 times slower than the "for loop" executed inside the "non secure" code.
Is that possibile?
Maybe I'm wrong but I have not found this reduction of performances explained inside the documentation of the MCU.
Thanks in advance.
