Declare multipart AEAD functions

Declare and document multipart AEAD functions.

This commit does not contain any implementation or tests.
This commit is contained in:
Gilles Peskine 2019-01-14 18:36:12 +01:00
parent f45adda9ac
commit 30a9e41076
4 changed files with 483 additions and 4 deletions

View file

@ -3053,7 +3053,7 @@ typedef struct
uint8_t tag_length;
} aead_operation_t;
static void psa_aead_abort( aead_operation_t *operation )
static void psa_aead_abort_internal( aead_operation_t *operation )
{
switch( operation->core_alg )
{
@ -3140,7 +3140,7 @@ static psa_status_t psa_aead_setup( aead_operation_t *operation,
return( PSA_SUCCESS );
cleanup:
psa_aead_abort( operation );
psa_aead_abort_internal( operation );
return( status );
}
@ -3211,7 +3211,7 @@ psa_status_t psa_aead_encrypt( psa_key_handle_t handle,
memset( ciphertext, 0, ciphertext_size );
exit:
psa_aead_abort( &operation );
psa_aead_abort_internal( &operation );
if( status == PSA_SUCCESS )
*ciphertext_length = plaintext_length + operation.tag_length;
return( status );
@ -3308,7 +3308,7 @@ psa_status_t psa_aead_decrypt( psa_key_handle_t handle,
memset( plaintext, 0, plaintext_size );
exit:
psa_aead_abort( &operation );
psa_aead_abort_internal( &operation );
if( status == PSA_SUCCESS )
*plaintext_length = ciphertext_length - operation.tag_length;
return( status );