Combine core pake computation stage(step,sequence,state) into single driver step
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
8c8ab26b2a
commit
b09c487546
8 changed files with 136 additions and 110 deletions
|
@ -2865,8 +2865,7 @@ psa_status_t psa_driver_wrapper_pake_setup(
|
|||
}
|
||||
psa_status_t psa_driver_wrapper_pake_output(
|
||||
psa_pake_operation_t *operation,
|
||||
psa_pake_step_t step,
|
||||
const psa_pake_computation_stage_t *computation_stage,
|
||||
psa_pake_driver_step_t step,
|
||||
uint8_t *output,
|
||||
size_t output_size,
|
||||
size_t *output_length )
|
||||
|
@ -2876,8 +2875,7 @@ psa_status_t psa_driver_wrapper_pake_output(
|
|||
#if defined(MBEDTLS_PSA_BUILTIN_PAKE)
|
||||
case PSA_CRYPTO_MBED_TLS_DRIVER_ID:
|
||||
return( mbedtls_psa_pake_output( &operation->data.ctx.mbedtls_ctx, step,
|
||||
computation_stage, output,
|
||||
output_size, output_length ) );
|
||||
output, output_size, output_length ) );
|
||||
#endif /* MBEDTLS_PSA_BUILTIN_PAKE */
|
||||
|
||||
#if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
|
||||
|
@ -2885,16 +2883,15 @@ psa_status_t psa_driver_wrapper_pake_output(
|
|||
case MBEDTLS_TEST_TRANSPARENT_DRIVER_ID:
|
||||
return( mbedtls_test_transparent_pake_output(
|
||||
&operation->data.ctx.transparent_test_driver_ctx,
|
||||
step, computation_stage, output, output_size, output_length ) );
|
||||
step, output, output_size, output_length ) );
|
||||
case MBEDTLS_TEST_OPAQUE_DRIVER_ID:
|
||||
return( mbedtls_test_opaque_pake_output(
|
||||
&operation->data.ctx.opaque_test_driver_ctx,
|
||||
step, computation_stage, output, output_size, output_length ) );
|
||||
step, output, output_size, output_length ) );
|
||||
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
||||
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
|
||||
default:
|
||||
(void) step;
|
||||
(void) computation_stage;
|
||||
(void) output;
|
||||
(void) output_size;
|
||||
(void) output_length;
|
||||
|
@ -2904,8 +2901,7 @@ psa_status_t psa_driver_wrapper_pake_output(
|
|||
|
||||
psa_status_t psa_driver_wrapper_pake_input(
|
||||
psa_pake_operation_t *operation,
|
||||
psa_pake_step_t step,
|
||||
const psa_pake_computation_stage_t *computation_stage,
|
||||
psa_pake_driver_step_t step,
|
||||
const uint8_t *input,
|
||||
size_t input_length )
|
||||
{
|
||||
|
@ -2914,7 +2910,7 @@ psa_status_t psa_driver_wrapper_pake_input(
|
|||
#if defined(MBEDTLS_PSA_BUILTIN_PAKE)
|
||||
case PSA_CRYPTO_MBED_TLS_DRIVER_ID:
|
||||
return( mbedtls_psa_pake_input( &operation->data.ctx.mbedtls_ctx,
|
||||
step, computation_stage, input,
|
||||
step, input,
|
||||
input_length ) );
|
||||
#endif /* MBEDTLS_PSA_BUILTIN_PAKE */
|
||||
|
||||
|
@ -2923,18 +2919,17 @@ psa_status_t psa_driver_wrapper_pake_input(
|
|||
case MBEDTLS_TEST_TRANSPARENT_DRIVER_ID:
|
||||
return( mbedtls_test_transparent_pake_input(
|
||||
&operation->data.ctx.transparent_test_driver_ctx,
|
||||
step, computation_stage,
|
||||
step,
|
||||
input, input_length ) );
|
||||
case MBEDTLS_TEST_OPAQUE_DRIVER_ID:
|
||||
return( mbedtls_test_opaque_pake_input(
|
||||
&operation->data.ctx.opaque_test_driver_ctx,
|
||||
step, computation_stage,
|
||||
step,
|
||||
input, input_length ) );
|
||||
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
||||
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
|
||||
default:
|
||||
(void) step;
|
||||
(void) computation_stage;
|
||||
(void) input;
|
||||
(void) input_length;
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue