Boot: Add RSA-3072 support to MCUBoot

PSA TBSA-M recommends to use RSA signature for firmware
authentication with at least 3072 bits length key size.
This patch introduces:
- add an example RSA-3072 key
- add configurable RSA-3072 support (RSA-2048 still available)
- set RSA-3072 to default

This change is based on:
https://github.com/JuulLabs-OSS/mcuboot/pull/476
authored by Fabio Utzig <utzig@apache.org>

Change-Id: Ic8d188f64d0dbe54aebf28c2778fb932e1afeeb9
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
diff --git a/bl2/ext/mcuboot/bootutil/src/image_rsa.c b/bl2/ext/mcuboot/bootutil/src/image_rsa.c
index 3ab03ce..a9f2393 100644
--- a/bl2/ext/mcuboot/bootutil/src/image_rsa.c
+++ b/bl2/ext/mcuboot/bootutil/src/image_rsa.c
@@ -38,13 +38,13 @@
 
 /*
  * Constants for this particular constrained implementation of
- * RSA-PSS.  In particular, we support RSA 2048, with a SHA256 hash,
- * and a 32-byte salt.  A signature with different parameters will be
+ * RSA-PSS.  In particular, we support RSA 2048 and RSA 3072, with a SHA256
+ * hash, and a 32-byte salt.  A signature with different parameters will be
  * rejected as invalid.
  */
 
 /* The size, in octets, of the message. */
-#define PSS_EMLEN 256
+#define PSS_EMLEN (MCUBOOT_SIGN_RSA_LEN / 8)
 
 /* The size of the hash function.  For SHA256, this is 32 bytes. */
 #define PSS_HLEN 32
@@ -53,7 +53,7 @@
 #define PSS_SLEN 32
 
 /* The length of the mask: emLen - hLen - 1. */
-#define PSS_MASK_LEN (256 - PSS_HLEN - 1)
+#define PSS_MASK_LEN (PSS_EMLEN - PSS_HLEN - 1)
 
 #define PSS_HASH_OFFSET PSS_MASK_LEN