1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

psa: cipher: Pass Mbed TLS implementation its operation ctx

As per drivers, pass to the Mbed TLS implementation of
the cipher multi-part operation its operation context
and not the PSA operation context.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron
2021-03-10 09:58:47 +01:00
parent 937dfee92c
commit 6e412a71ee
4 changed files with 51 additions and 59 deletions

View File

@@ -48,7 +48,7 @@
* \retval #PSA_ERROR_CORRUPTION_DETECTED
*/
psa_status_t mbedtls_psa_cipher_encrypt_setup(
psa_cipher_operation_t *operation,
mbedtls_psa_cipher_operation_t *operation,
const psa_key_attributes_t *attributes,
const uint8_t *key_buffer, size_t key_buffer_size,
psa_algorithm_t alg );
@@ -78,7 +78,7 @@ psa_status_t mbedtls_psa_cipher_encrypt_setup(
* \retval #PSA_ERROR_CORRUPTION_DETECTED
*/
psa_status_t mbedtls_psa_cipher_decrypt_setup(
psa_cipher_operation_t *operation,
mbedtls_psa_cipher_operation_t *operation,
const psa_key_attributes_t *attributes,
const uint8_t *key_buffer, size_t key_buffer_size,
psa_algorithm_t alg );
@@ -106,7 +106,7 @@ psa_status_t mbedtls_psa_cipher_decrypt_setup(
* \retval #PSA_ERROR_INSUFFICIENT_MEMORY
*/
psa_status_t mbedtls_psa_cipher_generate_iv(
psa_cipher_operation_t *operation,
mbedtls_psa_cipher_operation_t *operation,
uint8_t *iv, size_t iv_size, size_t *iv_length );
/** Set the IV for a symmetric encryption or decryption operation.
@@ -130,7 +130,7 @@ psa_status_t mbedtls_psa_cipher_generate_iv(
* \retval #PSA_ERROR_INSUFFICIENT_MEMORY
*/
psa_status_t mbedtls_psa_cipher_set_iv(
psa_cipher_operation_t *operation,
mbedtls_psa_cipher_operation_t *operation,
const uint8_t *iv, size_t iv_length );
/** Encrypt or decrypt a message fragment in an active cipher operation.
@@ -155,7 +155,7 @@ psa_status_t mbedtls_psa_cipher_set_iv(
* \retval #PSA_ERROR_INSUFFICIENT_MEMORY
*/
psa_status_t mbedtls_psa_cipher_update(
psa_cipher_operation_t *operation,
mbedtls_psa_cipher_operation_t *operation,
const uint8_t *input, size_t input_length,
uint8_t *output, size_t output_size, size_t *output_length );
@@ -186,7 +186,7 @@ psa_status_t mbedtls_psa_cipher_update(
* \retval #PSA_ERROR_INSUFFICIENT_MEMORY
*/
psa_status_t mbedtls_psa_cipher_finish(
psa_cipher_operation_t *operation,
mbedtls_psa_cipher_operation_t *operation,
uint8_t *output, size_t output_size, size_t *output_length );
/** Abort a cipher operation.
@@ -204,6 +204,6 @@ psa_status_t mbedtls_psa_cipher_finish(
*
* \retval #PSA_SUCCESS
*/
psa_status_t mbedtls_psa_cipher_abort( psa_cipher_operation_t *operation );
psa_status_t mbedtls_psa_cipher_abort( mbedtls_psa_cipher_operation_t *operation );
#endif /* PSA_CRYPTO_CIPHER_H */