Allow alternative backends for crypto provider

The crypto service provider is refactored to make it easy to add
alternative backends.  There is still only a single backend that
uses the mbedcrypto library from MbedTLS.  However, all dependencies
from the crypto provider on mbedcrypto have been removed, allowing
the crypto provider to be used with alternative implementations
of the PSA Crypto API.

Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: Ic5d1d9d47d149b634d147712749fdee48f260d85
diff --git a/components/service/crypto/backend/mbedcrypto/mbedcrypto_backend.h b/components/service/crypto/backend/mbedcrypto/mbedcrypto_backend.h
new file mode 100644
index 0000000..28bd2e9
--- /dev/null
+++ b/components/service/crypto/backend/mbedcrypto/mbedcrypto_backend.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef MBEDCRYPTO_BACKEND_H
+#define MBEDCRYPTO_BACKEND_H
+
+#include <stdbool.h>
+#include <psa/error.h>
+#include <service/secure_storage/backend/storage_backend.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \brief Initialize the mbedcrypto based backend
+ *
+ * Initializes a crypto backend that uses the mbedcrypto library built by
+ * MbedTLS to realize the PSA crypto API used by the crypto service proviser.
+ *
+ * \param[in] storage_backend   The storage backend to use for persistent keys
+ * \param[in] trng_instance_num  The TRNG hardware instance number to use
+ *
+ * \return PSA_SUCCESS if backend initialized successfully
+ */
+psa_status_t mbedcrypto_backend_init(struct storage_backend *storage_backend,
+						int trng_instance_num);
+
+/**
+ * \brief Clean-up to free any resource used by the backend
+ */
+void mbedcrypto_backend_deinit(void);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* MBEDCRYPTO_BACKEND_H */