Lines Matching refs:operation

447     /* Perform the private key operation */
1060 psa_cipher_operation_t operation = PSA_CIPHER_OPERATION_INIT;
1086 PSA_ASSERT(psa_cipher_encrypt_setup(&operation, key, alg));
1090 PSA_ASSERT(psa_cipher_set_iv(&operation, output1, iv_size));
1094 PSA_ASSERT(psa_cipher_update(&operation,
1102 PSA_ASSERT(psa_cipher_finish(&operation,
1112 PSA_ASSERT(psa_cipher_abort(&operation));
1119 psa_cipher_abort(&operation);
1155 psa_cipher_operation_t operation = PSA_CIPHER_OPERATION_INIT;
1160 /* Test operation initialization */
1170 operation.ctx.mbedtls_ctx = mbedtls_operation;
1171 operation.ctx.transparent_test_driver_ctx = transparent_operation;
1172 operation.ctx.opaque_test_driver_ctx = opaque_operation;
1184 PSA_ASSERT(psa_cipher_encrypt_setup(&operation, key, alg));
1188 PSA_ASSERT(psa_cipher_set_iv(&operation, iv->x, iv->len));
1202 PSA_ASSERT(psa_cipher_update(&operation, input->x, first_part_size,
1212 PSA_ASSERT(psa_cipher_update(&operation,
1230 status = psa_cipher_finish(&operation,
1241 PSA_ASSERT(psa_cipher_abort(&operation));
1249 psa_cipher_abort(&operation);
1284 psa_cipher_operation_t operation = PSA_CIPHER_OPERATION_INIT;
1289 /* Test operation initialization */
1299 operation.ctx.mbedtls_ctx = mbedtls_operation;
1300 operation.ctx.transparent_test_driver_ctx = transparent_operation;
1301 operation.ctx.opaque_test_driver_ctx = opaque_operation;
1313 PSA_ASSERT(psa_cipher_decrypt_setup(&operation, key, alg));
1317 PSA_ASSERT(psa_cipher_set_iv(&operation, iv->x, iv->len));
1331 PSA_ASSERT(psa_cipher_update(&operation,
1342 PSA_ASSERT(psa_cipher_update(&operation,
1360 status = psa_cipher_finish(&operation,
1371 PSA_ASSERT(psa_cipher_abort(&operation));
1379 psa_cipher_abort(&operation);
1472 psa_cipher_operation_t operation = PSA_CIPHER_OPERATION_INIT;
1519 status = psa_cipher_encrypt_setup(&operation, key, alg);
1524 status = psa_cipher_set_iv(&operation, iv->x, iv->len);
1529 status = psa_cipher_decrypt_setup(&operation, key, alg);
1534 status = psa_cipher_set_iv(&operation, iv->x, iv->len);
1540 status = psa_cipher_encrypt_setup(&operation, key, alg);
1546 status = psa_cipher_set_iv(&operation, iv->x, iv->len);
1552 status = psa_cipher_update(&operation,
1558 psa_cipher_abort(&operation);
1562 status = psa_cipher_encrypt_setup(&operation, key, alg);
1574 status = psa_cipher_generate_iv(&operation, output, 16, &function_output_length);
1580 status = psa_cipher_update(&operation,
1586 psa_cipher_abort(&operation);
1590 status = psa_cipher_encrypt_setup(&operation, key, alg);
1595 status = psa_cipher_set_iv(&operation, iv->x, iv->len);
1601 status = psa_cipher_update(&operation,
1610 status = psa_cipher_update(&operation,
1616 psa_cipher_abort(&operation);
1620 status = psa_cipher_encrypt_setup(&operation, key, alg);
1625 status = psa_cipher_set_iv(&operation, iv->x, iv->len);
1630 status = psa_cipher_update(&operation,
1639 status = psa_cipher_finish(&operation,
1648 status = psa_cipher_update(&operation,
1654 psa_cipher_abort(&operation);
1657 psa_cipher_abort(&operation);
1807 psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
1849 PSA_ASSERT(psa_mac_abort(&operation));
1861 psa_mac_abort(&operation);
1881 psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
1911 status = psa_mac_sign_setup(&operation, key, alg);
1931 status = psa_mac_update(&operation,
1947 status = psa_mac_sign_finish(&operation,
1963 PSA_ASSERT(psa_mac_abort(&operation));
1979 psa_mac_abort(&operation);
1998 psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
2031 PSA_ASSERT(psa_mac_abort(&operation));
2034 psa_mac_abort(&operation);
2053 psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
2076 status = psa_mac_verify_setup(&operation, key, alg);
2096 status = psa_mac_update(&operation,
2113 status = psa_mac_verify_finish(&operation,
2130 PSA_ASSERT(psa_mac_abort(&operation));
2138 psa_mac_abort(&operation);
2291 psa_hash_operation_t operation = PSA_HASH_OPERATION_INIT;
2302 TEST_EQUAL(psa_hash_setup(&operation, alg), expected_status);
2307 PSA_ASSERT(psa_hash_update(&operation, input->x, input->len));
2312 PSA_ASSERT(psa_hash_finish(&operation,
2323 psa_hash_abort(&operation);
2338 psa_hash_operation_t operation = PSA_HASH_OPERATION_INIT;
2349 * Update inactive operation, the driver shouldn't be called.
2351 TEST_EQUAL(psa_hash_update(&operation, input->x, input->len),
2355 PSA_ASSERT(psa_hash_setup(&operation, alg));
2360 TEST_EQUAL(psa_hash_update(&operation, input->x, input->len),
2369 PSA_ASSERT(psa_hash_finish(&operation,
2380 psa_hash_abort(&operation);
2395 psa_hash_operation_t operation = PSA_HASH_OPERATION_INIT;
2405 * Finish inactive operation, the driver shouldn't be called.
2407 TEST_EQUAL(psa_hash_finish(&operation, output, PSA_HASH_LENGTH(alg),
2412 PSA_ASSERT(psa_hash_setup(&operation, alg));
2416 PSA_ASSERT(psa_hash_update(&operation, input->x, input->len));
2421 TEST_EQUAL(psa_hash_finish(&operation,
2434 psa_hash_abort(&operation);
2460 * Clone inactive operation, the driver shouldn't be called.
2812 psa_aead_operation_t operation = psa_aead_operation_init();
2840 status = psa_aead_encrypt_setup(&operation, key, alg);
2847 PSA_ASSERT(psa_aead_set_nonce(&operation, nonce->x, nonce->len));
2854 PSA_ASSERT(psa_aead_set_lengths(&operation, additional_data->len,
2861 PSA_ASSERT(psa_aead_update_ad(&operation, additional_data->x,
2868 PSA_ASSERT(psa_aead_update(&operation, input_data->x, input_data->len,
2874 /* Finish the encryption operation */
2875 PSA_ASSERT(psa_aead_finish(&operation, output_data + output_length,
2926 psa_aead_operation_t operation = psa_aead_operation_init();
2944 status = psa_aead_decrypt_setup(&operation, key, alg);
2953 PSA_ASSERT(psa_aead_set_nonce(&operation, nonce->x, nonce->len));
2957 PSA_ASSERT(psa_aead_set_lengths(&operation, additional_data->len,
2963 PSA_ASSERT(psa_aead_update_ad(&operation, additional_data->x,
2969 PSA_ASSERT(psa_aead_update(&operation, input_ciphertext->x,
2978 PSA_ASSERT(psa_aead_verify(&operation, output_data + output_length,
2986 /* Since this is a decryption operation,
3013 psa_pake_operation_t operation = psa_pake_operation_init();
3060 TEST_EQUAL(psa_pake_setup(&operation, &cipher_suite),
3063 PSA_ASSERT(psa_pake_set_user(&operation, jpake_server_id, sizeof(jpake_server_id)));
3064 PSA_ASSERT(psa_pake_set_peer(&operation, jpake_client_id, sizeof(jpake_client_id)));
3066 TEST_EQUAL(psa_pake_set_password_key(&operation, key),
3078 TEST_EQUAL(psa_pake_input(&operation, PSA_PAKE_STEP_KEY_SHARE,
3089 TEST_EQUAL(psa_pake_output(&operation, PSA_PAKE_STEP_KEY_SHARE,
3100 TEST_EQUAL(psa_pake_input(&operation, PSA_PAKE_STEP_KEY_SHARE,
3117 TEST_EQUAL(psa_pake_output(&operation, PSA_PAKE_STEP_KEY_SHARE,
3137 TEST_EQUAL(psa_pake_input(&operation, PSA_PAKE_STEP_KEY_SHARE,
3142 operation.computation_stage.jpake.round = PSA_JPAKE_FINISHED;
3143 operation.computation_stage.jpake.inputs = 0;
3144 operation.computation_stage.jpake.outputs = 0;
3145 operation.computation_stage.jpake.step = PSA_PAKE_STEP_KEY_SHARE;
3151 TEST_EQUAL(psa_pake_get_implicit_key(&operation, &implicit_key),
3161 TEST_EQUAL(psa_pake_input(&operation, PSA_PAKE_STEP_KEY_SHARE,
3169 TEST_EQUAL(psa_pake_abort(&operation), expected_status);
3181 TEST_EQUAL(psa_pake_abort(&operation), PSA_SUCCESS);
3278 /* After the key is obtained operation is aborted.
3288 /* After the key is obtained operation is aborted.