Lines Matching refs:status

203     status = psa_crypto_local_input_alloc(input, length, \
205 if (status != PSA_SUCCESS) { \
245 status = psa_crypto_local_output_alloc(output, length, \
247 if (status != PSA_SUCCESS) { \
269 status = local_output_status; \
595 static void psa_wipe_tag_output_buffer(uint8_t *output_buffer, psa_status_t status, in psa_wipe_tag_output_buffer() argument
606 if (status == PSA_SUCCESS) { in psa_wipe_tag_output_buffer()
736 psa_status_t status = psa_allocate_buffer_to_slot(slot, in psa_copy_key_material_into_slot() local
738 if (status != PSA_SUCCESS) { in psa_copy_key_material_into_slot()
739 return status; in psa_copy_key_material_into_slot()
752 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in psa_import_key_into_slot() local
763 status = psa_validate_unstructured_key_bit_size(attributes->type, in psa_import_key_into_slot()
765 if (status != PSA_SUCCESS) { in psa_import_key_into_slot()
766 return status; in psa_import_key_into_slot()
1108 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in psa_get_and_lock_key_slot_with_policy() local
1111 status = psa_get_and_lock_key_slot(key, p_slot); in psa_get_and_lock_key_slot_with_policy()
1112 if (status != PSA_SUCCESS) { in psa_get_and_lock_key_slot_with_policy()
1113 return status; in psa_get_and_lock_key_slot_with_policy()
1126 status = PSA_ERROR_NOT_PERMITTED; in psa_get_and_lock_key_slot_with_policy()
1132 status = psa_key_policy_permits(&slot->attr.policy, in psa_get_and_lock_key_slot_with_policy()
1135 if (status != PSA_SUCCESS) { in psa_get_and_lock_key_slot_with_policy()
1146 return status; in psa_get_and_lock_key_slot_with_policy()
1174 psa_status_t status = psa_get_and_lock_key_slot_with_policy(key, p_slot, in psa_get_and_lock_transparent_key_slot_with_policy() local
1176 if (status != PSA_SUCCESS) { in psa_get_and_lock_transparent_key_slot_with_policy()
1177 return status; in psa_get_and_lock_transparent_key_slot_with_policy()
1216 psa_status_t status = psa_remove_key_data_from_memory(slot); in psa_wipe_key_slot() local
1237 status = PSA_ERROR_CORRUPTION_DETECTED; in psa_wipe_key_slot()
1244 status = PSA_ERROR_CORRUPTION_DETECTED; in psa_wipe_key_slot()
1250 status = PSA_ERROR_CORRUPTION_DETECTED; in psa_wipe_key_slot()
1254 status = PSA_ERROR_CORRUPTION_DETECTED; in psa_wipe_key_slot()
1278 if (status == PSA_SUCCESS) { in psa_wipe_key_slot()
1279 status = psa_free_key_slot(slice_index, slot); in psa_wipe_key_slot()
1283 return status; in psa_wipe_key_slot()
1289 psa_status_t status; /* status of the last operation */ in psa_destroy_key() local
1306 status = psa_get_and_lock_key_slot(key, &slot); in psa_destroy_key()
1307 if (status != PSA_SUCCESS) { in psa_destroy_key()
1308 return status; in psa_destroy_key()
1323 status = psa_unregister_read(slot); in psa_destroy_key()
1327 return (status == PSA_SUCCESS) ? PSA_ERROR_INVALID_HANDLE : status; in psa_destroy_key()
1367 status = psa_crypto_save_transaction(); in psa_destroy_key()
1368 if (status != PSA_SUCCESS) { in psa_destroy_key()
1377 overall_status = status; in psa_destroy_key()
1381 status = psa_destroy_se_key(driver, in psa_destroy_key()
1384 overall_status = status; in psa_destroy_key()
1394 status = psa_destroy_persistent_key(slot->attr.id); in psa_destroy_key()
1396 overall_status = status; in psa_destroy_key()
1403 status = psa_save_se_persistent_data(driver); in psa_destroy_key()
1405 overall_status = status; in psa_destroy_key()
1407 status = psa_crypto_stop_transaction(); in psa_destroy_key()
1409 overall_status = status; in psa_destroy_key()
1417 status = psa_unregister_read(slot); in psa_destroy_key()
1420 if (status != PSA_SUCCESS) { in psa_destroy_key()
1421 overall_status = status; in psa_destroy_key()
1426 status = overall_status; in psa_destroy_key()
1439 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in psa_get_key_attributes() local
1444 status = psa_get_and_lock_key_slot_with_policy(key, &slot, 0, 0); in psa_get_key_attributes()
1445 if (status != PSA_SUCCESS) { in psa_get_key_attributes()
1446 return status; in psa_get_key_attributes()
1518 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in psa_export_key() local
1540 status = psa_get_and_lock_key_slot_with_policy(key, &slot, in psa_export_key()
1542 if (status != PSA_SUCCESS) { in psa_export_key()
1543 return status; in psa_export_key()
1548 status = psa_driver_wrapper_export_key(&slot->attr, in psa_export_key()
1558 return (status == PSA_SUCCESS) ? unlock_status : status; in psa_export_key()
1633 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in psa_export_public_key() local
1653 status = psa_get_and_lock_key_slot_with_policy(key, &slot, 0, 0); in psa_export_public_key()
1654 if (status != PSA_SUCCESS) { in psa_export_public_key()
1655 return status; in psa_export_public_key()
1661 status = PSA_ERROR_INVALID_ARGUMENT; in psa_export_public_key()
1665 status = psa_driver_wrapper_export_public_key( in psa_export_public_key()
1673 return (status == PSA_SUCCESS) ? unlock_status : status; in psa_export_public_key()
1717 psa_status_t status = PSA_ERROR_INVALID_ARGUMENT; local
1721 status = psa_validate_key_location(lifetime, p_drv);
1722 if (status != PSA_SUCCESS) {
1723 return status;
1726 status = psa_validate_key_persistence(lifetime);
1727 if (status != PSA_SUCCESS) {
1728 return status;
1745 status = psa_validate_key_policy(&attributes->policy);
1746 if (status != PSA_SUCCESS) {
1747 return status;
1797 psa_status_t status; local
1802 status = psa_validate_key_attributes(attributes, p_drv);
1803 if (status != PSA_SUCCESS) {
1804 return status;
1814 status = psa_reserve_free_key_slot(
1821 if (status != PSA_SUCCESS) {
1822 return status;
1863 status = psa_find_se_slot_for_key(attributes, method, *p_drv,
1865 if (status != PSA_SUCCESS) {
1866 return status;
1874 status = psa_crypto_save_transaction();
1875 if (status != PSA_SUCCESS) {
1877 return status;
1881 status = psa_copy_key_material_into_slot(
1883 if (status != PSA_SUCCESS) {
1884 return status;
1932 psa_status_t status = PSA_SUCCESS; local
1954 status = psa_save_persistent_key(&slot->attr,
1962 status = psa_save_persistent_key(&slot->attr,
1977 status = psa_save_se_persistent_data(driver);
1978 if (status != PSA_SUCCESS) {
1985 return status;
1987 status = psa_crypto_stop_transaction();
1991 if (status == PSA_SUCCESS) {
1993 status = psa_key_slot_state_transition(slot, PSA_SLOT_FILLING,
1995 if (status != PSA_SUCCESS) {
2004 return status;
2092 psa_status_t status; local
2115 status = psa_start_key_creation(PSA_KEY_CREATION_IMPORT, attributes,
2117 if (status != PSA_SUCCESS) {
2127 status = psa_driver_wrapper_get_key_buffer_size_from_key_data(
2129 if (status != PSA_SUCCESS) {
2133 status = psa_allocate_buffer_to_slot(slot, storage_size);
2134 if (status != PSA_SUCCESS) {
2140 status = psa_driver_wrapper_import_key(attributes,
2145 if (status != PSA_SUCCESS) {
2152 status = PSA_ERROR_INVALID_ARGUMENT;
2159 status = PSA_ERROR_NOT_SUPPORTED;
2162 status = psa_validate_optional_attributes(slot, attributes);
2163 if (status != PSA_SUCCESS) {
2167 status = psa_finish_key_creation(slot, driver, key);
2170 if (status != PSA_SUCCESS) {
2174 return status;
2181 psa_status_t status; local
2205 status = psa_start_key_creation(PSA_KEY_CREATION_REGISTER, attributes,
2207 if (status != PSA_SUCCESS) {
2211 status = psa_finish_key_creation(slot, driver, &key);
2214 if (status != PSA_SUCCESS) {
2220 return status;
2228 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2238 status = psa_get_and_lock_key_slot_with_policy(
2240 if (status != PSA_SUCCESS) {
2244 status = psa_validate_optional_attributes(source_slot,
2246 if (status != PSA_SUCCESS) {
2259 status = psa_restrict_key_policy(source_slot->attr.type,
2262 if (status != PSA_SUCCESS) {
2266 status = psa_start_key_creation(PSA_KEY_CREATION_COPY, &actual_attributes,
2268 if (status != PSA_SUCCESS) {
2280 status = PSA_ERROR_NOT_SUPPORTED;
2290 status = psa_driver_wrapper_get_key_buffer_size(&actual_attributes,
2292 if (status != PSA_SUCCESS) {
2296 status = psa_allocate_buffer_to_slot(target_slot, storage_size);
2297 if (status != PSA_SUCCESS) {
2301 status = psa_driver_wrapper_copy_key(&actual_attributes,
2307 if (status != PSA_SUCCESS) {
2311 status = psa_copy_key_material_into_slot(target_slot,
2314 if (status != PSA_SUCCESS) {
2318 status = psa_finish_key_creation(target_slot, driver, target_key);
2320 if (status != PSA_SUCCESS) {
2326 return (status == PSA_SUCCESS) ? unlock_status : status;
2342 psa_status_t status = psa_driver_wrapper_hash_abort(operation); local
2345 return status;
2351 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2355 status = PSA_ERROR_BAD_STATE;
2360 status = PSA_ERROR_INVALID_ARGUMENT;
2368 status = psa_driver_wrapper_hash_setup(operation, alg);
2371 if (status != PSA_SUCCESS) {
2375 return status;
2382 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2386 status = PSA_ERROR_BAD_STATE;
2397 status = psa_driver_wrapper_hash_update(operation, input, input_length);
2400 if (status != PSA_SUCCESS) {
2405 return status;
2413 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2420 status = psa_driver_wrapper_hash_finish(
2424 return status;
2432 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2436 status = psa_hash_finish_internal(operation, hash, hash_size, hash_length);
2442 return status;
2451 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2454 status = psa_hash_finish_internal(
2459 if (status != PSA_SUCCESS) {
2464 status = PSA_ERROR_INVALID_SIGNATURE;
2470 status = PSA_ERROR_INVALID_SIGNATURE;
2475 if (status != PSA_SUCCESS) {
2479 return status;
2487 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2498 status = psa_driver_wrapper_hash_compute(alg, input, input_length,
2506 return status;
2515 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2521 status = PSA_ERROR_INVALID_ARGUMENT;
2522 return status;
2526 status = psa_driver_wrapper_hash_compute(
2530 if (status != PSA_SUCCESS) {
2534 status = PSA_ERROR_INVALID_SIGNATURE;
2540 status = PSA_ERROR_INVALID_SIGNATURE;
2549 return status;
2560 psa_status_t status = psa_driver_wrapper_hash_clone(source_operation, local
2562 if (status != PSA_SUCCESS) {
2566 return status;
2581 psa_status_t status = psa_driver_wrapper_mac_abort(operation); local
2586 return status;
2594 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2603 status = psa_mac_key_can_do(alg, key_type);
2604 if (status != PSA_SUCCESS) {
2605 return status;
2647 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2653 status = PSA_ERROR_BAD_STATE;
2657 status = psa_get_and_lock_key_slot_with_policy(
2662 if (status != PSA_SUCCESS) {
2666 status = psa_mac_finalize_alg_and_key_validation(alg, &slot->attr,
2668 if (status != PSA_SUCCESS) {
2675 status = psa_driver_wrapper_mac_sign_setup(operation,
2681 status = psa_driver_wrapper_mac_verify_setup(operation,
2689 if (status != PSA_SUCCESS) {
2695 return (status == PSA_SUCCESS) ? unlock_status : status;
2716 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2720 status = PSA_ERROR_BAD_STATE;
2721 return status;
2727 status = PSA_SUCCESS;
2728 return status;
2732 status = psa_driver_wrapper_mac_update(operation, input, input_length);
2734 if (status != PSA_SUCCESS) {
2743 return status;
2751 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2757 status = PSA_ERROR_BAD_STATE;
2762 status = PSA_ERROR_BAD_STATE;
2769 status = PSA_ERROR_BAD_STATE;
2774 status = PSA_ERROR_BUFFER_TOO_SMALL;
2779 status = psa_driver_wrapper_mac_sign_finish(operation,
2790 if (status != PSA_SUCCESS) {
2796 psa_wipe_tag_output_buffer(mac, status, mac_size, *mac_length);
2802 return status == PSA_SUCCESS ? abort_status : status;
2809 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2814 status = PSA_ERROR_BAD_STATE;
2819 status = PSA_ERROR_BAD_STATE;
2824 status = PSA_ERROR_INVALID_SIGNATURE;
2829 status = psa_driver_wrapper_mac_verify_finish(operation,
2836 return status == PSA_SUCCESS ? abort_status : status;
2848 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2853 status = psa_get_and_lock_key_slot_with_policy(
2858 if (status != PSA_SUCCESS) {
2862 status = psa_mac_finalize_alg_and_key_validation(alg, &slot->attr,
2864 if (status != PSA_SUCCESS) {
2869 status = PSA_ERROR_BUFFER_TOO_SMALL;
2873 status = psa_driver_wrapper_mac_compute(
2887 if (status != PSA_SUCCESS) {
2892 psa_wipe_tag_output_buffer(mac, status, mac_size, *mac_length);
2896 return (status == PSA_SUCCESS) ? unlock_status : status;
2907 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2913 status = psa_mac_compute_internal(key, alg,
2923 return status;
2933 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
2940 status = psa_mac_compute_internal(key, alg,
2944 if (status != PSA_SUCCESS) {
2949 status = PSA_ERROR_INVALID_SIGNATURE;
2955 status = PSA_ERROR_INVALID_SIGNATURE;
2964 return status;
3002 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3008 status = psa_sign_verify_check_alg(input_is_message, alg);
3009 if (status != PSA_SUCCESS) {
3010 return status;
3021 status = psa_get_and_lock_key_slot_with_policy(
3027 if (status != PSA_SUCCESS) {
3032 status = PSA_ERROR_INVALID_ARGUMENT;
3037 status = psa_driver_wrapper_sign_message(
3043 status = psa_driver_wrapper_sign_hash(
3051 psa_wipe_tag_output_buffer(signature, status, signature_size,
3056 return (status == PSA_SUCCESS) ? unlock_status : status;
3067 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3071 status = psa_sign_verify_check_alg(input_is_message, alg);
3072 if (status != PSA_SUCCESS) {
3073 return status;
3076 status = psa_get_and_lock_key_slot_with_policy(
3082 if (status != PSA_SUCCESS) {
3083 return status;
3087 status = psa_driver_wrapper_verify_message(
3092 status = psa_driver_wrapper_verify_hash(
3100 return (status == PSA_SUCCESS) ? unlock_status : status;
3115 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3121 status = psa_driver_wrapper_hash_compute(
3126 if (status != PSA_SUCCESS) {
3127 return status;
3147 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3153 status = psa_sign_internal(key, 1, alg, input, input_length, signature,
3161 return status;
3174 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3180 status = psa_driver_wrapper_hash_compute(
3185 if (status != PSA_SUCCESS) {
3186 return status;
3205 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3211 status = psa_verify_internal(key, 1, alg, input, input_length, signature,
3220 return status;
3279 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3285 status = psa_sign_internal(key, 0, alg, hash, hash_length, signature,
3294 return status;
3351 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3357 status = psa_verify_internal(key, 0, alg, hash, hash_length, signature,
3366 return status;
3379 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3399 status = psa_get_and_lock_key_slot_with_policy(
3401 if (status != PSA_SUCCESS) {
3402 return status;
3406 status = PSA_ERROR_INVALID_ARGUMENT;
3414 status = psa_driver_wrapper_asymmetric_encrypt(
3425 return (status == PSA_SUCCESS) ? unlock_status : status;
3438 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3458 status = psa_get_and_lock_key_slot_with_policy(
3460 if (status != PSA_SUCCESS) {
3461 return status;
3464 status = PSA_ERROR_INVALID_ARGUMENT;
3472 status = psa_driver_wrapper_asymmetric_decrypt(
3484 return (status == PSA_SUCCESS) ? unlock_status : status;
3525 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3527 status = psa_driver_wrapper_sign_hash_abort(operation);
3535 return status;
3543 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3555 status = psa_sign_verify_check_alg(0, alg);
3556 if (status != PSA_SUCCESS) {
3558 return status;
3561 status = psa_get_and_lock_key_slot_with_policy(key, &slot,
3565 if (status != PSA_SUCCESS) {
3570 status = PSA_ERROR_INVALID_ARGUMENT;
3579 status = psa_driver_wrapper_sign_hash_start(operation, &slot->attr,
3585 if (status != PSA_SUCCESS) {
3598 return (status == PSA_SUCCESS) ? unlock_status : status;
3607 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3616 status = PSA_ERROR_BAD_STATE;
3623 status = PSA_ERROR_BUFFER_TOO_SMALL;
3629 status = psa_driver_wrapper_sign_hash_complete(operation, signature,
3639 psa_wipe_tag_output_buffer(signature, status, signature_size,
3643 if (status != PSA_OPERATION_INCOMPLETE) {
3644 if (status != PSA_SUCCESS) {
3653 return status;
3659 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3661 status = psa_sign_hash_abort_internal(operation);
3670 return status;
3683 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3685 status = psa_driver_wrapper_verify_hash_abort(operation);
3693 return status;
3702 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3715 status = psa_sign_verify_check_alg(0, alg);
3716 if (status != PSA_SUCCESS) {
3718 return status;
3721 status = psa_get_and_lock_key_slot_with_policy(key, &slot,
3725 if (status != PSA_SUCCESS) {
3727 return status;
3736 status = psa_driver_wrapper_verify_hash_start(operation, &slot->attr,
3745 if (status != PSA_SUCCESS) {
3759 return (status == PSA_SUCCESS) ? unlock_status : status;
3765 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3770 status = PSA_ERROR_BAD_STATE;
3774 status = psa_driver_wrapper_verify_hash_complete(operation);
3782 if (status != PSA_OPERATION_INCOMPLETE) {
3783 if (status != PSA_SUCCESS) {
3790 return status;
3796 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3798 status = psa_verify_hash_abort_internal(operation);
3807 return status;
3874 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3894 status = mbedtls_psa_ecp_load_representation(attributes->type,
3900 if (status != PSA_SUCCESS) {
3901 return status;
3933 (void) status;
3951 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
3962 status = PSA_ERROR_BUFFER_TOO_SMALL;
3969 status = mbedtls_to_psa_error(
3981 status = PSA_ERROR_NOT_SUPPORTED;
3985 status = mbedtls_to_psa_error(
4003 if (status == PSA_SUCCESS) {
4004 status = mbedtls_to_psa_error(
4010 if (status != PSA_SUCCESS) {
4014 status = mbedtls_to_psa_error(
4021 if (status != PSA_SUCCESS) {
4027 status = PSA_SUCCESS;
4034 return status;
4089 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
4112 status = mbedtls_psa_ecp_load_representation(attributes->type,
4118 if (status != PSA_SUCCESS) {
4119 return status;
4128 status = mbedtls_to_psa_error(
4133 if (status != PSA_SUCCESS) {
4134 return status;
4137 status = mbedtls_to_psa_error(
4143 if (status != PSA_SUCCESS) {
4144 return status;
4147 status = mbedtls_psa_ecp_load_public_part(operation->ctx);
4149 if (status != PSA_SUCCESS) {
4150 return status;
4176 (void) status;
4194 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
4199 status = mbedtls_to_psa_error(
4212 return status;
4263 psa_status_t status; local
4265 status = mbedtls_psa_external_get_random(&global_data.rng,
4268 if (status != PSA_SUCCESS) {
4269 return status;
4311 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
4320 status = PSA_ERROR_BAD_STATE;
4325 status = PSA_ERROR_INVALID_ARGUMENT;
4329 status = psa_get_and_lock_key_slot_with_policy(key, &slot, usage, alg);
4330 if (status != PSA_SUCCESS) {
4348 status = psa_driver_wrapper_cipher_encrypt_setup(operation,
4354 status = psa_driver_wrapper_cipher_decrypt_setup(operation,
4362 if (status != PSA_SUCCESS) {
4368 return (status == PSA_SUCCESS) ? unlock_status : status;
4390 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
4396 status = PSA_ERROR_BAD_STATE;
4401 status = PSA_ERROR_BAD_STATE;
4407 status = PSA_ERROR_BUFFER_TOO_SMALL;
4412 status = PSA_ERROR_GENERIC_ERROR;
4418 status = psa_generate_random_internal(iv, default_iv_length);
4419 if (status != PSA_SUCCESS) {
4423 status = psa_driver_wrapper_cipher_set_iv(operation,
4427 if (status == PSA_SUCCESS) {
4439 return status;
4446 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
4451 status = PSA_ERROR_BAD_STATE;
4456 status = PSA_ERROR_BAD_STATE;
4461 status = PSA_ERROR_INVALID_ARGUMENT;
4467 status = psa_driver_wrapper_cipher_set_iv(operation,
4472 if (status == PSA_SUCCESS) {
4480 return status;
4490 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
4496 status = PSA_ERROR_BAD_STATE;
4501 status = PSA_ERROR_BAD_STATE;
4508 status = psa_driver_wrapper_cipher_update(operation,
4516 if (status != PSA_SUCCESS) {
4523 return status;
4531 psa_status_t status = PSA_ERROR_GENERIC_ERROR; local
4536 status = PSA_ERROR_BAD_STATE;
4541 status = PSA_ERROR_BAD_STATE;
4547 status = psa_driver_wrapper_cipher_finish(operation,
4553 if (status == PSA_SUCCESS) {
4554 status = psa_cipher_abort(operation);
4562 return status;
4591 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
4601 status = PSA_ERROR_INVALID_ARGUMENT;
4605 status = psa_get_and_lock_key_slot_with_policy(key, &slot,
4608 if (status != PSA_SUCCESS) {
4614 status = PSA_ERROR_GENERIC_ERROR;
4620 status = PSA_ERROR_BUFFER_TOO_SMALL;
4624 status = psa_generate_random_internal(local_iv, default_iv_length);
4625 if (status != PSA_SUCCESS) {
4633 status = psa_driver_wrapper_cipher_encrypt(
4641 if (status == PSA_SUCCESS) {
4642 status = unlock_status;
4645 if (status == PSA_SUCCESS) {
4657 return status;
4668 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
4676 status = PSA_ERROR_INVALID_ARGUMENT;
4680 status = psa_get_and_lock_key_slot_with_policy(key, &slot,
4683 if (status != PSA_SUCCESS) {
4688 status = PSA_ERROR_INVALID_ARGUMENT;
4695 status = psa_driver_wrapper_cipher_decrypt(
4702 if (status == PSA_SUCCESS) {
4703 status = unlock_status;
4706 if (status != PSA_SUCCESS) {
4713 return status;
4792 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
4802 status = psa_aead_check_algorithm(alg);
4803 if (status != PSA_SUCCESS) {
4804 return status;
4807 status = psa_get_and_lock_key_slot_with_policy(
4809 if (status != PSA_SUCCESS) {
4810 return status;
4818 status = psa_aead_check_nonce_length(alg, nonce_length);
4819 if (status != PSA_SUCCESS) {
4823 status = psa_driver_wrapper_aead_encrypt(
4831 if (status != PSA_SUCCESS && ciphertext_size != 0) {
4843 return status;
4858 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
4868 status = psa_aead_check_algorithm(alg);
4869 if (status != PSA_SUCCESS) {
4870 return status;
4873 status = psa_get_and_lock_key_slot_with_policy(
4875 if (status != PSA_SUCCESS) {
4876 return status;
4885 status = psa_aead_check_nonce_length(alg, nonce_length);
4886 if (status != PSA_SUCCESS) {
4890 status = psa_driver_wrapper_aead_decrypt(
4898 if (status != PSA_SUCCESS && plaintext_size != 0) {
4910 return status;
4958 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
4963 status = psa_aead_check_algorithm(alg);
4964 if (status != PSA_SUCCESS) {
4969 status = PSA_ERROR_BAD_STATE;
4975 status = PSA_ERROR_BAD_STATE;
4985 status = psa_get_and_lock_key_slot_with_policy(key, &slot, key_usage,
4987 if (status != PSA_SUCCESS) {
4991 if ((status = psa_validate_tag_length(alg)) != PSA_SUCCESS) {
4996 status = psa_driver_wrapper_aead_encrypt_setup(operation,
5002 status = psa_driver_wrapper_aead_decrypt_setup(operation,
5008 if (status != PSA_SUCCESS) {
5017 if (status == PSA_SUCCESS) {
5018 status = unlock_status;
5025 return status;
5048 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
5051 status = PSA_ERROR_BAD_STATE;
5056 status = PSA_ERROR_BAD_STATE;
5060 status = psa_aead_check_nonce_length(operation->alg, nonce_length);
5061 if (status != PSA_SUCCESS) {
5062 status = PSA_ERROR_INVALID_ARGUMENT;
5066 status = psa_driver_wrapper_aead_set_nonce(operation, nonce,
5070 if (status == PSA_SUCCESS) {
5076 return status;
5085 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
5095 status = PSA_ERROR_BAD_STATE;
5100 status = PSA_ERROR_BAD_STATE;
5116 status = PSA_ERROR_BUFFER_TOO_SMALL;
5120 status = psa_generate_random_internal(local_nonce, required_nonce_size);
5121 if (status != PSA_SUCCESS) {
5125 status = psa_aead_set_nonce_internal(operation, local_nonce,
5129 if (status == PSA_SUCCESS) {
5138 return status;
5147 psa_status_t status; local
5152 status = psa_aead_set_nonce_internal(operation, nonce, nonce_length);
5161 return status;
5169 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
5172 status = PSA_ERROR_BAD_STATE;
5178 status = PSA_ERROR_BAD_STATE;
5191 status = PSA_ERROR_INVALID_ARGUMENT;
5200 status = PSA_ERROR_INVALID_ARGUMENT;
5214 status = psa_driver_wrapper_aead_set_lengths(operation, ad_length,
5218 if (status == PSA_SUCCESS) {
5226 return status;
5234 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
5240 status = PSA_ERROR_BAD_STATE;
5245 status = PSA_ERROR_BAD_STATE;
5251 status = PSA_SUCCESS;
5257 status = PSA_ERROR_INVALID_ARGUMENT;
5265 status = PSA_ERROR_BAD_STATE;
5270 status = psa_driver_wrapper_aead_update_ad(operation, input,
5274 if (status == PSA_SUCCESS) {
5282 return status;
5294 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
5306 status = PSA_ERROR_BAD_STATE;
5311 status = PSA_ERROR_BAD_STATE;
5319 status = PSA_ERROR_INVALID_ARGUMENT;
5325 status = PSA_ERROR_INVALID_ARGUMENT;
5333 status = PSA_ERROR_BAD_STATE;
5338 status = psa_driver_wrapper_aead_update(operation, input, input_length,
5343 if (status == PSA_SUCCESS) {
5352 return status;
5378 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
5389 status = psa_aead_final_checks(operation);
5390 if (status != PSA_SUCCESS) {
5395 status = PSA_ERROR_BAD_STATE;
5399 status = psa_driver_wrapper_aead_finish(operation, ciphertext,
5412 psa_wipe_tag_output_buffer(tag, status, tag_size, *tag_length);
5419 return status;
5431 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
5441 status = psa_aead_final_checks(operation);
5442 if (status != PSA_SUCCESS) {
5447 status = PSA_ERROR_BAD_STATE;
5451 status = psa_driver_wrapper_aead_verify(operation, plaintext,
5462 return status;
5468 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
5477 status = psa_driver_wrapper_aead_abort(operation);
5481 return status;
5505 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
5514 status = psa_driver_wrapper_mac_sign_setup(operation,
5520 return status;
5541 psa_status_t status = PSA_SUCCESS; local
5551 status = psa_mac_abort(&operation->ctx.hkdf.hmac);
5579 status = PSA_SUCCESS;
5599 status = PSA_SUCCESS;
5603 status = PSA_ERROR_BAD_STATE;
5606 return status;
5644 psa_status_t status; local
5687 status = psa_key_derivation_start_hmac(&hkdf->hmac,
5691 if (status != PSA_SUCCESS) {
5692 return status;
5696 status = psa_mac_update(&hkdf->hmac,
5699 if (status != PSA_SUCCESS) {
5700 return status;
5703 status = psa_mac_update(&hkdf->hmac,
5706 if (status != PSA_SUCCESS) {
5707 return status;
5709 status = psa_mac_update(&hkdf->hmac,
5711 if (status != PSA_SUCCESS) {
5712 return status;
5714 status = psa_mac_sign_finish(&hkdf->hmac,
5718 if (status != PSA_SUCCESS) {
5719 return status;
5737 psa_status_t status, cleanup_status; local
5769 status = psa_key_derivation_start_hmac(&hmac,
5773 if (status != PSA_SUCCESS) {
5782 status = psa_mac_update(&hmac,
5785 if (status != PSA_SUCCESS) {
5788 status = psa_mac_update(&hmac,
5791 if (status != PSA_SUCCESS) {
5796 status = psa_mac_update(&hmac, tls12_prf->Ai, hash_length);
5797 if (status != PSA_SUCCESS) {
5802 status = psa_mac_sign_finish(&hmac,
5806 status = PSA_ERROR_CORRUPTION_DETECTED;
5808 if (status != PSA_SUCCESS) {
5813 status = psa_key_derivation_start_hmac(&hmac,
5817 if (status != PSA_SUCCESS) {
5820 status = psa_mac_update(&hmac, tls12_prf->Ai, hash_length);
5821 if (status != PSA_SUCCESS) {
5824 status = psa_mac_update(&hmac, tls12_prf->label, tls12_prf->label_length);
5825 if (status != PSA_SUCCESS) {
5828 status = psa_mac_update(&hmac, tls12_prf->seed, tls12_prf->seed_length);
5829 if (status != PSA_SUCCESS) {
5832 status = psa_mac_sign_finish(&hmac,
5835 if (status != PSA_SUCCESS) {
5842 if (status == PSA_SUCCESS && cleanup_status != PSA_SUCCESS) {
5843 status = cleanup_status;
5846 return status;
5857 psa_status_t status; local
5873 status = psa_key_derivation_tls12_prf_generate_next_block(tls12_prf,
5875 if (status != PSA_SUCCESS) {
5876 return status;
5906 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
5913 status = psa_hash_compute(PSA_ALG_SHA_256, ecjpake->data,
5916 if (status != PSA_SUCCESS) {
5917 return status;
5935 psa_status_t status; local
5947 status = psa_driver_wrapper_mac_sign_setup(&mac_operation,
5952 if (status != PSA_SUCCESS) {
5955 status = psa_mac_update(&mac_operation, pbkdf2->salt, pbkdf2->salt_length);
5956 if (status != PSA_SUCCESS) {
5959 status = psa_mac_update(&mac_operation, block_counter, sizeof(block_counter));
5960 if (status != PSA_SUCCESS) {
5963 status = psa_mac_sign_finish(&mac_operation, U_i, sizeof(U_i),
5965 if (status != PSA_SUCCESS) {
5970 status = PSA_ERROR_CORRUPTION_DETECTED;
5980 status = psa_driver_wrapper_mac_compute(attributes,
5986 if (status != PSA_SUCCESS) {
5996 return status;
6005 psa_status_t status; local
6054 status = psa_key_derivation_pbkdf2_generate_block(pbkdf2, prf_alg,
6057 if (status != PSA_SUCCESS) {
6058 return status;
6071 psa_status_t status; local
6096 status = PSA_ERROR_INSUFFICIENT_DATA;
6104 status = psa_key_derivation_hkdf_read(&operation->ctx.hkdf, kdf_alg,
6112 status = psa_key_derivation_tls12_prf_read(&operation->ctx.tls12_prf,
6120 status = psa_key_derivation_tls12_ecjpake_to_pms_read(
6126 status = psa_key_derivation_pbkdf2_read(&operation->ctx.pbkdf2, kdf_alg,
6133 status = PSA_ERROR_BAD_STATE;
6136 return status;
6140 if (status != PSA_SUCCESS) {
6154 return status;
6214 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
6255 if ((status = psa_key_derivation_output_bytes(operation, *data, m_bytes)) != 0) {
6286 status = mbedtls_to_psa_error(ret);
6288 if (status != PSA_SUCCESS) {
6294 return status;
6318 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
6338 status = psa_key_derivation_output_bytes(operation, *data, output_length);
6340 if (status != PSA_SUCCESS) {
6341 return status;
6359 return status;
6392 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
6404 status = psa_generate_derived_ecc_key_weierstrass_helper(slot, bits, operation, &data);
6405 if (status != PSA_SUCCESS) {
6410 status = psa_generate_derived_ecc_key_montgomery_helper(bits, operation, &data);
6411 if (status != PSA_SUCCESS) {
6427 status = psa_key_derivation_output_bytes(operation, data, bytes);
6428 if (status != PSA_SUCCESS) {
6443 status = psa_driver_wrapper_get_key_buffer_size(&slot->attr,
6445 if (status != PSA_SUCCESS) {
6449 status = psa_allocate_buffer_to_slot(slot, storage_size);
6450 if (status != PSA_SUCCESS) {
6454 status = psa_driver_wrapper_import_key(&slot->attr,
6460 status = PSA_ERROR_INVALID_ARGUMENT;
6465 return status;
6492 psa_status_t status; local
6517 status = psa_start_key_creation(PSA_KEY_CREATION_DERIVE, attributes,
6522 status = PSA_ERROR_NOT_SUPPORTED;
6525 if (status == PSA_SUCCESS) {
6526 status = psa_generate_derived_key_internal(slot,
6530 if (status == PSA_SUCCESS) {
6531 status = psa_finish_key_creation(slot, driver, key);
6533 if (status != PSA_SUCCESS) {
6537 return status;
6619 psa_status_t status = psa_hash_setup(&operation, alg); local
6621 return status;
6659 psa_status_t status = psa_hash_try_support(hash_alg); local
6660 if (status != PSA_SUCCESS) {
6661 return status;
6704 status = PSA_ERROR_NOT_SUPPORTED;
6706 return status;
6722 psa_status_t status = psa_key_derivation_set_maximum_capacity(operation, local
6724 return status;
6759 psa_status_t status; local
6771 status = psa_key_agreement_try_support(ka_alg);
6772 if (status != PSA_SUCCESS) {
6773 return status;
6778 status = psa_key_derivation_setup_kdf(operation, kdf_alg);
6784 status = psa_key_derivation_setup_kdf(operation, alg);
6792 if (status == PSA_SUCCESS) {
6795 return status;
6806 psa_status_t status; local
6817 status = psa_key_derivation_start_hmac(&hkdf->hmac,
6820 if (status != PSA_SUCCESS) {
6821 return status;
6854 status = psa_key_derivation_start_hmac(&hkdf->hmac,
6857 if (status != PSA_SUCCESS) {
6858 return status;
6865 status = psa_mac_update(&hkdf->hmac,
6867 if (status != PSA_SUCCESS) {
6868 return status;
6870 status = psa_mac_sign_finish(&hkdf->hmac,
6874 if (status != PSA_SUCCESS) {
6875 return status;
7026 psa_status_t status; local
7079 status = psa_tls12_prf_set_key(prf, pms, (size_t) (cur - pms));
7082 return status;
7227 psa_status_t status = PSA_SUCCESS; local
7235 return status;
7245 psa_status_t status = PSA_SUCCESS; local
7255 status = psa_driver_wrapper_mac_compute(&attributes,
7267 return status;
7276 psa_status_t status = PSA_SUCCESS; local
7284 status = psa_pbkdf2_hmac_set_password(hash_alg, data, data_length,
7291 status = psa_pbkdf2_cmac_set_password(data, data_length,
7302 return status;
7385 psa_status_t status; local
7388 status = psa_key_derivation_check_input_type(step, key_type);
7389 if (status != PSA_SUCCESS) {
7395 status = psa_hkdf_input(&operation->ctx.hkdf, kdf_alg,
7401 status = psa_tls12_prf_input(&operation->ctx.tls12_prf,
7407 status = psa_tls12_prf_psk_to_ms_input(&operation->ctx.tls12_prf,
7413 status = psa_tls12_ecjpake_to_pms_input(
7419 status = psa_pbkdf2_input(&operation->ctx.pbkdf2, kdf_alg,
7432 if (status != PSA_SUCCESS) {
7435 return status;
7443 psa_status_t status; local
7448 status = psa_pbkdf2_set_input_cost(
7456 status = PSA_ERROR_INVALID_ARGUMENT;
7459 if (status != PSA_SUCCESS) {
7462 return status;
7471 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
7476 status = psa_key_derivation_input_internal(operation, step,
7483 return status;
7499 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
7503 status = psa_get_and_lock_transparent_key_slot_with_policy(
7505 if (status != PSA_SUCCESS) {
7507 return status;
7517 status = psa_key_derivation_input_internal(operation,
7524 return (status == PSA_SUCCESS) ? unlock_status : status;
7615 psa_status_t status; local
7622 status = psa_key_agreement_raw_internal(ka_alg,
7628 if (status != PSA_SUCCESS) {
7635 status = psa_key_derivation_input_internal(operation, step,
7641 return status;
7650 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
7658 status = psa_get_and_lock_transparent_key_slot_with_policy(
7660 if (status != PSA_SUCCESS) {
7661 return status;
7665 status = psa_key_agreement_internal(operation, step,
7672 if (status != PSA_SUCCESS) {
7685 return (status == PSA_SUCCESS) ? unlock_status : status;
7696 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
7705 status = PSA_ERROR_INVALID_ARGUMENT;
7708 status = psa_get_and_lock_transparent_key_slot_with_policy(
7710 if (status != PSA_SUCCESS) {
7725 status = PSA_ERROR_BUFFER_TOO_SMALL;
7730 status = psa_key_agreement_raw_internal(alg, slot,
7738 if (output != NULL && status != PSA_SUCCESS) {
7759 return (status == PSA_SUCCESS) ? unlock_status : status;
7840 psa_status_t status; local
7845 status = psa_generate_random_internal(output, output_size);
7851 return status;
7888 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
7891 status = psa_validate_unstructured_key_bit_size(type, bits);
7892 if (status != PSA_SUCCESS) {
7893 return status;
7941 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
7950 status = psa_generate_random_internal(key_buffer, key_buffer_size);
7951 if (status != PSA_SUCCESS) {
7952 return status;
8003 psa_status_t status; local
8032 status = psa_start_key_creation(PSA_KEY_CREATION_GENERATE, attributes,
8034 if (status != PSA_SUCCESS) {
8045 status = psa_validate_key_type_and_size_for_key_generation(
8047 if (status != PSA_SUCCESS) {
8055 status = psa_driver_wrapper_get_key_buffer_size(
8057 if (status != PSA_SUCCESS) {
8062 status = psa_allocate_buffer_to_slot(slot, key_buffer_size);
8063 if (status != PSA_SUCCESS) {
8068 status = psa_driver_wrapper_generate_key(attributes,
8073 if (status != PSA_SUCCESS) {
8078 if (status == PSA_SUCCESS) {
8079 status = psa_finish_key_creation(slot, driver, key);
8081 if (status != PSA_SUCCESS) {
8085 return status;
8118 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
8125 status = PSA_ERROR_BAD_STATE;
8129 status = PSA_SUCCESS;
8136 return status;
8218 psa_status_t status = PSA_SUCCESS; local
8230 status = psa_driver_wrapper_init();
8251 status = psa_initialize_key_slots();
8290 status = mbedtls_psa_random_seed(&global_data.rng);
8291 if (status == PSA_SUCCESS) {
8311 status = psa_crypto_load_transaction();
8312 if (status == PSA_SUCCESS) {
8313 status = psa_crypto_recover_transaction(&psa_crypto_transaction);
8314 if (status == PSA_SUCCESS) {
8317 status = psa_crypto_stop_transaction();
8318 } else if (status == PSA_ERROR_DOES_NOT_EXIST) {
8321 status = PSA_SUCCESS;
8325 status = PSA_SUCCESS;
8337 status = PSA_ERROR_CORRUPTION_DETECTED;
8345 return status;
8350 psa_status_t status; local
8358 status = mbedtls_psa_crypto_init_subsystem(PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS);
8359 if (status != PSA_SUCCESS) {
8363 status = mbedtls_psa_crypto_init_subsystem(PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS);
8364 if (status != PSA_SUCCESS) {
8368 status = mbedtls_psa_crypto_init_subsystem(PSA_CRYPTO_SUBSYSTEM_RNG);
8369 if (status != PSA_SUCCESS) {
8373 status = mbedtls_psa_crypto_init_subsystem(PSA_CRYPTO_SUBSYSTEM_TRANSACTION);
8377 if (status != PSA_SUCCESS) {
8381 return status;
8495 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
8498 status = PSA_ERROR_BAD_STATE;
8504 status = PSA_ERROR_INVALID_ARGUMENT;
8525 status = PSA_ERROR_NOT_SUPPORTED;
8534 return status;
8541 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
8547 status = PSA_ERROR_BAD_STATE;
8551 status = psa_get_and_lock_key_slot_with_policy(password, &slot,
8554 if (status != PSA_SUCCESS) {
8562 status = PSA_ERROR_INVALID_ARGUMENT;
8568 status = PSA_ERROR_INSUFFICIENT_MEMORY;
8577 if (status != PSA_SUCCESS) {
8581 return (status == PSA_SUCCESS) ? unlock_status : status;
8589 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
8593 status = PSA_ERROR_BAD_STATE;
8598 status = PSA_ERROR_INVALID_ARGUMENT;
8603 status = PSA_ERROR_BAD_STATE;
8609 status = PSA_ERROR_INSUFFICIENT_MEMORY;
8618 status = PSA_SUCCESS;
8622 if (status != PSA_SUCCESS) {
8625 return status;
8633 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
8637 status = PSA_ERROR_BAD_STATE;
8642 status = PSA_ERROR_INVALID_ARGUMENT;
8647 status = PSA_ERROR_BAD_STATE;
8653 status = PSA_ERROR_INSUFFICIENT_MEMORY;
8662 status = PSA_SUCCESS;
8666 if (status != PSA_SUCCESS) {
8669 return status;
8676 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
8679 status = PSA_ERROR_BAD_STATE;
8689 status = PSA_ERROR_INVALID_ARGUMENT;
8694 status = PSA_ERROR_NOT_SUPPORTED;
8699 return status;
8734 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
8752 status = psa_driver_wrapper_pake_setup(operation, &inputs);
8761 if (status == PSA_SUCCESS) {
8768 status = PSA_ERROR_NOT_SUPPORTED;
8771 return status;
8858 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
8864 status = psa_pake_complete_inputs(operation);
8865 if (status != PSA_SUCCESS) {
8871 status = PSA_ERROR_BAD_STATE;
8876 status = PSA_ERROR_INVALID_ARGUMENT;
8883 status = psa_jpake_prologue(operation, step, PSA_JPAKE_OUTPUT);
8884 if (status != PSA_SUCCESS) {
8893 status = PSA_ERROR_NOT_SUPPORTED;
8899 status = psa_driver_wrapper_pake_output(operation, driver_step,
8902 if (status != PSA_SUCCESS) {
8909 status = psa_jpake_epilogue(operation, PSA_JPAKE_OUTPUT);
8910 if (status != PSA_SUCCESS) {
8916 status = PSA_ERROR_NOT_SUPPORTED;
8922 if (status != PSA_SUCCESS) {
8925 return status;
8934 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
8942 status = psa_pake_complete_inputs(operation);
8943 if (status != PSA_SUCCESS) {
8949 status = PSA_ERROR_BAD_STATE;
8954 status = PSA_ERROR_INVALID_ARGUMENT;
8961 status = psa_jpake_prologue(operation, step, PSA_JPAKE_INPUT);
8962 if (status != PSA_SUCCESS) {
8971 status = PSA_ERROR_NOT_SUPPORTED;
8976 status = psa_driver_wrapper_pake_input(operation, driver_step,
8979 if (status != PSA_SUCCESS) {
8986 status = psa_jpake_epilogue(operation, PSA_JPAKE_INPUT);
8987 if (status != PSA_SUCCESS) {
8993 status = PSA_ERROR_NOT_SUPPORTED;
8999 if (status != PSA_SUCCESS) {
9002 return status;
9009 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; local
9015 status = PSA_ERROR_BAD_STATE;
9024 status = PSA_ERROR_BAD_STATE;
9030 status = PSA_ERROR_NOT_SUPPORTED;
9034 status = psa_driver_wrapper_pake_get_implicit_key(operation,
9039 if (status != PSA_SUCCESS) {
9043 status = psa_key_derivation_input_bytes(output,
9051 return status == PSA_SUCCESS ? abort_status : status;
9057 psa_status_t status = PSA_SUCCESS; local
9060 status = psa_driver_wrapper_pake_abort(operation);
9077 return status;
9173 psa_status_t status; local
9191 status = psa_crypto_copy_input(input, input_len,
9193 if (status != PSA_SUCCESS) {
9203 return status;
9235 psa_status_t status; local
9246 status = psa_crypto_copy_output(local_output->buffer, local_output->length,
9248 if (status != PSA_SUCCESS) {
9249 return status;