Static buffer memory consumption of RSA signature verification algorithm

I am using Mbed library in my RSA signature verification algorithm.
I would like to know the memory consummation of this algorithm (for both lengths 2048 and 3072).

I am using static buffer for memory allocation (I am using bare-metal) but I do not know which value exactly should be used … is there any guide or manual how to set this value?

Any one?

Hi @TareqElgafy
As you can see from this article, you can reduce the memory consumption, on the expense of performance.
In addition to this configuration, the bottleneck in the RAM usage is the key size, which should be configured in your MBEDTLS_MPI_MAX_SIZE value. If your maximal key size is 3072, I would set MBEDTLS_MPI_MAX_SIZE to 384.

As for how to use the memory allocation buffer, have you looked at this article?
Regards,
Mbed TLS Support
Ron

Thank you for your reply
I have checked the two articles but I cannot detect how this actually calculated, could you explain how 384 was set?

Hi @TareqElgafy

the key sizes are measured in bits. MBEDTLS_MPI_MAX_SIZE is the max size in bytes, so 3072 / 8 = 384

Regards,
Mbed TLS support

Ron