Reapply "boot: Add MCUBOOT_HW_KEY support for image encryption"

This reverts commit c06f7bb36782e0220b30c3d0640219d1368735d3.

Signed-off-by: David Vincze <david.vincze@arm.com>
Change-Id: Ic2ab2c4d3981dec3cd3c25a50b5a989000375372
diff --git a/boot/mbed/app_enc_keys.c b/boot/mbed/app_enc_keys.c
index 9bed4d8..be4f9cb 100644
--- a/boot/mbed/app_enc_keys.c
+++ b/boot/mbed/app_enc_keys.c
@@ -69,3 +69,12 @@
 #endif
 
 #endif
+
+#if !defined(MCUBOOT_HW_KEY) && defined(MCUBOOT_ENC_IMAGES)
+int boot_enc_retrieve_private_key(struct bootutil_key **private_key)
+{
+    *private_key = (struct bootutil_key *)&bootutil_enc_key;
+
+    return 0;
+}
+#endif /* !MCUBOOT_HW_KEY && MCUBOOT_ENC_IMAGES */