Crypto: Align to PSA Crypto headers 0.1.0a
This patch updates the PSA Crypto API headers to version
0.1.0a. The Crypto service implementation is updated when
needed to make sure the service is buildable and functional.
Change-Id: I63709db0d87f449012d0c8355658f1af1583b3ab
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
diff --git a/secure_fw/services/crypto/tfm_crypto_api.h b/secure_fw/services/crypto/tfm_crypto_api.h
index 9b575a5..d596ed9 100644
--- a/secure_fw/services/crypto/tfm_crypto_api.h
+++ b/secure_fw/services/crypto/tfm_crypto_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -72,7 +72,7 @@
*/
enum tfm_crypto_err_t tfm_crypto_operation_lookup(
enum tfm_crypto_operation_type type,
- uint32_t *handle,
+ uint32_t handle,
void **oper);
/**
* \brief Import the key data in the provided key slot
@@ -148,7 +148,7 @@
*
* \return Returns values as described in \ref tfm_crypto_err_t
*/
-enum tfm_crypto_err_t tfm_crypto_encrypt_set_iv(
+enum tfm_crypto_err_t tfm_crypto_cipher_set_iv(
psa_cipher_operation_t *operation,
const unsigned char *iv,
size_t iv_length);
@@ -162,7 +162,7 @@
*
* \return Returns values as described in \ref tfm_crypto_err_t
*/
-enum tfm_crypto_err_t tfm_crypto_encrypt_setup(
+enum tfm_crypto_err_t tfm_crypto_cipher_encrypt_setup(
psa_cipher_operation_t *operation,
psa_key_slot_t key,
psa_algorithm_t alg);
@@ -176,7 +176,7 @@
*
* \return Returns values as described in \ref tfm_crypto_err_t
*/
-enum tfm_crypto_err_t tfm_crypto_decrypt_setup(
+enum tfm_crypto_err_t tfm_crypto_cipher_decrypt_setup(
psa_cipher_operation_t *operation,
psa_key_slot_t key,
psa_algorithm_t alg);
@@ -235,7 +235,7 @@
*
* \return Returns values as described in \ref tfm_crypto_err_t
*/
-enum tfm_crypto_err_t tfm_crypto_hash_start(psa_hash_operation_t *operation,
+enum tfm_crypto_err_t tfm_crypto_hash_setup(psa_hash_operation_t *operation,
psa_algorithm_t alg);
/**
* \brief Adds a new input chunk to the data for which the final hash value