Lines Matching refs:cipher_psa

216             mbedtls_cipher_context_psa * const cipher_psa =  in mbedtls_cipher_free()  local
219 if (cipher_psa->slot_state == MBEDTLS_CIPHER_PSA_KEY_OWNED) { in mbedtls_cipher_free()
221 (void) psa_destroy_key(cipher_psa->slot); in mbedtls_cipher_free()
224 mbedtls_zeroize_and_free(cipher_psa, sizeof(*cipher_psa)); in mbedtls_cipher_free()
302 mbedtls_cipher_context_psa *cipher_psa; in mbedtls_cipher_setup_psa() local
320 cipher_psa = mbedtls_calloc(1, sizeof(mbedtls_cipher_context_psa)); in mbedtls_cipher_setup_psa()
321 if (cipher_psa == NULL) { in mbedtls_cipher_setup_psa()
324 cipher_psa->alg = alg; in mbedtls_cipher_setup_psa()
325 ctx->cipher_ctx = cipher_psa; in mbedtls_cipher_setup_psa()
362 mbedtls_cipher_context_psa * const cipher_psa = in mbedtls_cipher_setkey() local
377 if (cipher_psa->slot_state != MBEDTLS_CIPHER_PSA_KEY_UNSET) { in mbedtls_cipher_setkey()
394 psa_set_key_algorithm(&attributes, cipher_psa->alg); in mbedtls_cipher_setkey()
397 &cipher_psa->slot); in mbedtls_cipher_setkey()
410 cipher_psa->slot_state = MBEDTLS_CIPHER_PSA_KEY_OWNED; in mbedtls_cipher_setkey()
1369 mbedtls_cipher_context_psa * const cipher_psa = in mbedtls_cipher_crypt() local
1378 cipher_psa->slot, in mbedtls_cipher_crypt()
1379 cipher_psa->alg); in mbedtls_cipher_crypt()
1382 cipher_psa->slot, in mbedtls_cipher_crypt()
1383 cipher_psa->alg); in mbedtls_cipher_crypt()
1464 mbedtls_cipher_context_psa * const cipher_psa = in mbedtls_cipher_aead_encrypt() local
1475 status = psa_aead_encrypt(cipher_psa->slot, in mbedtls_cipher_aead_encrypt()
1476 cipher_psa->alg, in mbedtls_cipher_aead_encrypt()
1541 mbedtls_cipher_context_psa * const cipher_psa = in mbedtls_cipher_aead_decrypt() local
1552 status = psa_aead_decrypt(cipher_psa->slot, in mbedtls_cipher_aead_decrypt()
1553 cipher_psa->alg, in mbedtls_cipher_aead_decrypt()