Lines Matching refs:cipher_ctx
214 if (ctx->cipher_ctx != NULL) { in mbedtls_cipher_free()
216 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_free()
238 if (ctx->cipher_ctx) { in mbedtls_cipher_free()
239 mbedtls_cipher_get_base(ctx->cipher_info)->ctx_free_func(ctx->cipher_ctx); in mbedtls_cipher_free()
255 ctx->cipher_ctx = mbedtls_cipher_get_base(cipher_info)->ctx_alloc_func(); in mbedtls_cipher_setup()
256 if (ctx->cipher_ctx == NULL) { in mbedtls_cipher_setup()
295 ctx->cipher_ctx = cipher_psa; in mbedtls_cipher_setup_psa()
323 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_setkey()
394 return mbedtls_cipher_get_base(ctx->cipher_info)->setkey_enc_func(ctx->cipher_ctx, key, in mbedtls_cipher_setkey()
399 return mbedtls_cipher_get_base(ctx->cipher_info)->setkey_dec_func(ctx->cipher_ctx, key, in mbedtls_cipher_setkey()
404 return mbedtls_cipher_get_base(ctx->cipher_info)->setkey_enc_func(ctx->cipher_ctx, key, in mbedtls_cipher_setkey()
455 if (0 != mbedtls_chacha20_starts((mbedtls_chacha20_context *) ctx->cipher_ctx, in mbedtls_cipher_set_iv()
471 return mbedtls_gcm_starts((mbedtls_gcm_context *) ctx->cipher_ctx, in mbedtls_cipher_set_iv()
483 (mbedtls_ccm_context *) ctx->cipher_ctx, in mbedtls_cipher_set_iv()
497 return mbedtls_ccm_starts((mbedtls_ccm_context *) ctx->cipher_ctx, in mbedtls_cipher_set_iv()
549 return mbedtls_gcm_update_ad((mbedtls_gcm_context *) ctx->cipher_ctx, in mbedtls_cipher_update_ad()
563 result = mbedtls_chachapoly_starts((mbedtls_chachapoly_context *) ctx->cipher_ctx, in mbedtls_cipher_update_ad()
570 return mbedtls_chachapoly_update_aad((mbedtls_chachapoly_context *) ctx->cipher_ctx, in mbedtls_cipher_update_ad()
611 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->ecb_func(ctx->cipher_ctx, in mbedtls_cipher_update()
622 return mbedtls_gcm_update((mbedtls_gcm_context *) ctx->cipher_ctx, in mbedtls_cipher_update()
630 return mbedtls_ccm_update((mbedtls_ccm_context *) ctx->cipher_ctx, in mbedtls_cipher_update()
639 return mbedtls_chachapoly_update((mbedtls_chachapoly_context *) ctx->cipher_ctx, in mbedtls_cipher_update()
678 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->cbc_func(ctx->cipher_ctx, in mbedtls_cipher_update()
721 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->cbc_func(ctx->cipher_ctx, in mbedtls_cipher_update()
738 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->cfb_func(ctx->cipher_ctx, in mbedtls_cipher_update()
754 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->ofb_func(ctx->cipher_ctx, in mbedtls_cipher_update()
770 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->ctr_func(ctx->cipher_ctx, in mbedtls_cipher_update()
792 ret = mbedtls_cipher_get_base(ctx->cipher_info)->xts_func(ctx->cipher_ctx, in mbedtls_cipher_update()
810 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->stream_func(ctx->cipher_ctx, in mbedtls_cipher_update()
1094 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->cbc_func(ctx->cipher_ctx, in mbedtls_cipher_finish()
1207 return mbedtls_gcm_finish((mbedtls_gcm_context *) ctx->cipher_ctx, in mbedtls_cipher_write_tag()
1221 (mbedtls_chachapoly_context *) ctx->cipher_ctx, tag); in mbedtls_cipher_write_tag()
1265 (mbedtls_gcm_context *) ctx->cipher_ctx, in mbedtls_cipher_check_tag()
1287 (mbedtls_chachapoly_context *) ctx->cipher_ctx, check_tag); in mbedtls_cipher_check_tag()
1325 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_crypt()
1420 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_aead_encrypt()
1448 return mbedtls_gcm_crypt_and_tag(ctx->cipher_ctx, MBEDTLS_GCM_ENCRYPT, in mbedtls_cipher_aead_encrypt()
1456 return mbedtls_ccm_encrypt_and_tag(ctx->cipher_ctx, ilen, in mbedtls_cipher_aead_encrypt()
1470 return mbedtls_chachapoly_encrypt_and_tag(ctx->cipher_ctx, in mbedtls_cipher_aead_encrypt()
1497 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_aead_decrypt()
1528 ret = mbedtls_gcm_auth_decrypt(ctx->cipher_ctx, ilen, in mbedtls_cipher_aead_decrypt()
1544 ret = mbedtls_ccm_auth_decrypt(ctx->cipher_ctx, ilen, in mbedtls_cipher_aead_decrypt()
1566 ret = mbedtls_chachapoly_auth_decrypt(ctx->cipher_ctx, ilen, in mbedtls_cipher_aead_decrypt()
1612 return mbedtls_nist_kw_wrap(ctx->cipher_ctx, mode, input, ilen, in mbedtls_cipher_auth_encrypt_ext()
1663 return mbedtls_nist_kw_unwrap(ctx->cipher_ctx, mode, input, ilen, in mbedtls_cipher_auth_decrypt_ext()