fix(psa): increase psa-mbedtls heap size for rsa
The value assigned for the mbedtls heap size for large
rsa keys was too small when PSA_CRYPTO is set to 1,
leading to run-time failures if one was to attempt
to use a large RSA key with PSA_CRYPTO=1.
Change-Id: Id9b2648ae911879f483f1b88301f28694af0721d
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
diff --git a/include/drivers/auth/mbedtls/default_mbedtls_config.h b/include/drivers/auth/mbedtls/default_mbedtls_config.h
index 12a5fe1..fa5c6f6 100644
--- a/include/drivers/auth/mbedtls/default_mbedtls_config.h
+++ b/include/drivers/auth/mbedtls/default_mbedtls_config.h
@@ -132,18 +132,15 @@
#endif
/*
- * Determine Mbed TLS heap size
- * 13312 = 13*1024
- * 11264 = 11*1024
- * 7168 = 7*1024
+ * Determine Mbed TLS heap size.
*/
#if TF_MBEDTLS_USE_ECDSA
-#define TF_MBEDTLS_HEAP_SIZE U(13312)
+#define TF_MBEDTLS_HEAP_SIZE U(13 * 1024)
#elif TF_MBEDTLS_USE_RSA
#if TF_MBEDTLS_KEY_SIZE <= 2048
-#define TF_MBEDTLS_HEAP_SIZE U(7168)
+#define TF_MBEDTLS_HEAP_SIZE U(7 * 1024)
#else
-#define TF_MBEDTLS_HEAP_SIZE U(11264)
+#define TF_MBEDTLS_HEAP_SIZE U(11 * 1024)
#endif
#endif