Add a minimum rsa key size config to psa config
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index c890e12..4e1f41b 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -7374,6 +7374,9 @@
if (bits > PSA_VENDOR_RSA_MAX_KEY_BITS) {
return PSA_ERROR_NOT_SUPPORTED;
}
+ if (bits < PSA_VENDOR_RSA_MIN_KEY_BITS) {
+ return PSA_ERROR_NOT_SUPPORTED;
+ }
/* Accept only byte-aligned keys, for the same reasons as
* in psa_import_rsa_key(). */