espressif: Enable signature verification (RSA, EC256 and ED25519)

MbedTLS and Tinycrypt security lib options added to Espressif's
configuration and build.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
diff --git a/boot/espressif/os.c b/boot/espressif/os.c
new file mode 100644
index 0000000..9b9d55b
--- /dev/null
+++ b/boot/espressif/os.c
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#ifdef CONFIG_ESP_USE_MBEDTLS
+
+#include <mbedtls/platform.h>
+#include <mbedtls/memory_buffer_alloc.h>
+
+#define CRYPTO_HEAP_SIZE 16384
+
+static unsigned char memory_buf[CRYPTO_HEAP_SIZE];
+
+/*
+ * Initialize Mbed TLS to be able to use the local heap.
+ */
+void os_heap_init(void)
+{
+    mbedtls_memory_buffer_alloc_init(memory_buf, sizeof(memory_buf));
+}
+#else
+
+void os_heap_init(void)
+{
+}
+
+#endif