Crypto: Further optimize crypto interface

- Simplify crypto function SID. Each uint16_t SID consists of function
  ID and group ID, without multi-part operation flags.
- Remove multi-part operation flags and relevant functions.
- Simplify group interface dispatcher in crypto_init.c
- Simplify operation handlings for multi-part steps to make the logic
  more reader friendly.
- Refine the input/output vectors in psa_hash_clone() otherwise the
  frontend and backend operation definitions will be mixed.

Change-Id: If45bd1c5e84364e4a4424c5d2843e151e1161d1a
Signed-off-by: David Hu <david.hu@arm.com>
diff --git a/interface/src/tfm_crypto_ipc_api.c b/interface/src/tfm_crypto_ipc_api.c
index cd1f7f5..833e948 100644
--- a/interface/src/tfm_crypto_ipc_api.c
+++ b/interface/src/tfm_crypto_ipc_api.c
@@ -469,17 +469,20 @@
         .op_handle = source_operation->handle,
     };
 
-    psa_invec in_vec[] = {
-        {.base = &iov, .len = sizeof(struct tfm_crypto_pack_iovec)},
-    };
-    psa_outvec out_vec[] = {
-        {.base = target_operation, .len = sizeof(psa_hash_operation_t)},
-    };
-
     if (target_operation && (target_operation->handle != 0)) {
         return PSA_ERROR_BAD_STATE;
     }
 
+    psa_invec in_vec[] = {
+        {.base = &iov, .len = sizeof(struct tfm_crypto_pack_iovec)},
+        {.base = &(target_operation->handle),
+         .len = sizeof(target_operation->handle)},
+    };
+    psa_outvec out_vec[] = {
+        {.base = &(target_operation->handle),
+         .len = sizeof(target_operation->handle)},
+    };
+
     return API_DISPATCH(in_vec, out_vec);
 }