Lines Matching refs:cipher_psa
215 mbedtls_cipher_context_psa * const cipher_psa = in mbedtls_cipher_free() local
218 if (cipher_psa->slot_state == MBEDTLS_CIPHER_PSA_KEY_OWNED) { in mbedtls_cipher_free()
220 (void) psa_destroy_key(cipher_psa->slot); in mbedtls_cipher_free()
223 mbedtls_zeroize_and_free(cipher_psa, sizeof(*cipher_psa)); in mbedtls_cipher_free()
272 mbedtls_cipher_context_psa *cipher_psa; in mbedtls_cipher_setup_psa() local
290 cipher_psa = mbedtls_calloc(1, sizeof(mbedtls_cipher_context_psa)); in mbedtls_cipher_setup_psa()
291 if (cipher_psa == NULL) { in mbedtls_cipher_setup_psa()
294 cipher_psa->alg = alg; in mbedtls_cipher_setup_psa()
295 ctx->cipher_ctx = cipher_psa; in mbedtls_cipher_setup_psa()
322 mbedtls_cipher_context_psa * const cipher_psa = in mbedtls_cipher_setkey() local
337 if (cipher_psa->slot_state != MBEDTLS_CIPHER_PSA_KEY_UNSET) { in mbedtls_cipher_setkey()
354 psa_set_key_algorithm(&attributes, cipher_psa->alg); in mbedtls_cipher_setkey()
357 &cipher_psa->slot); in mbedtls_cipher_setkey()
370 cipher_psa->slot_state = MBEDTLS_CIPHER_PSA_KEY_OWNED; in mbedtls_cipher_setkey()
1324 mbedtls_cipher_context_psa * const cipher_psa = in mbedtls_cipher_crypt() local
1333 cipher_psa->slot, in mbedtls_cipher_crypt()
1334 cipher_psa->alg); in mbedtls_cipher_crypt()
1337 cipher_psa->slot, in mbedtls_cipher_crypt()
1338 cipher_psa->alg); in mbedtls_cipher_crypt()
1419 mbedtls_cipher_context_psa * const cipher_psa = in mbedtls_cipher_aead_encrypt() local
1430 status = psa_aead_encrypt(cipher_psa->slot, in mbedtls_cipher_aead_encrypt()
1431 cipher_psa->alg, in mbedtls_cipher_aead_encrypt()
1496 mbedtls_cipher_context_psa * const cipher_psa = in mbedtls_cipher_aead_decrypt() local
1507 status = psa_aead_decrypt(cipher_psa->slot, in mbedtls_cipher_aead_decrypt()
1508 cipher_psa->alg, in mbedtls_cipher_aead_decrypt()