Lines Matching refs:cipher_ctx

215         if (ctx->cipher_ctx != NULL) {  in mbedtls_cipher_free()
217 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_free()
239 if (ctx->cipher_ctx) { in mbedtls_cipher_free()
240 mbedtls_cipher_get_base(ctx->cipher_info)->ctx_free_func(ctx->cipher_ctx); in mbedtls_cipher_free()
266 mbedtls_cipher_get_base(dst->cipher_info)->ctx_clone_func(dst->cipher_ctx, src->cipher_ctx); in mbedtls_cipher_clone()
285 ctx->cipher_ctx = mbedtls_cipher_get_base(cipher_info)->ctx_alloc_func(); in mbedtls_cipher_setup()
286 if (ctx->cipher_ctx == NULL) { in mbedtls_cipher_setup()
325 ctx->cipher_ctx = cipher_psa; in mbedtls_cipher_setup_psa()
363 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_setkey()
434 return mbedtls_cipher_get_base(ctx->cipher_info)->setkey_enc_func(ctx->cipher_ctx, key, in mbedtls_cipher_setkey()
439 return mbedtls_cipher_get_base(ctx->cipher_info)->setkey_dec_func(ctx->cipher_ctx, key, in mbedtls_cipher_setkey()
444 return mbedtls_cipher_get_base(ctx->cipher_info)->setkey_enc_func(ctx->cipher_ctx, key, in mbedtls_cipher_setkey()
495 if (0 != mbedtls_chacha20_starts((mbedtls_chacha20_context *) ctx->cipher_ctx, in mbedtls_cipher_set_iv()
511 return mbedtls_gcm_starts((mbedtls_gcm_context *) ctx->cipher_ctx, in mbedtls_cipher_set_iv()
523 (mbedtls_ccm_context *) ctx->cipher_ctx, in mbedtls_cipher_set_iv()
537 return mbedtls_ccm_starts((mbedtls_ccm_context *) ctx->cipher_ctx, in mbedtls_cipher_set_iv()
589 return mbedtls_gcm_update_ad((mbedtls_gcm_context *) ctx->cipher_ctx, in mbedtls_cipher_update_ad()
603 result = mbedtls_chachapoly_starts((mbedtls_chachapoly_context *) ctx->cipher_ctx, in mbedtls_cipher_update_ad()
610 return mbedtls_chachapoly_update_aad((mbedtls_chachapoly_context *) ctx->cipher_ctx, in mbedtls_cipher_update_ad()
651 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->ecb_func(ctx->cipher_ctx, in mbedtls_cipher_update()
662 return mbedtls_gcm_update((mbedtls_gcm_context *) ctx->cipher_ctx, in mbedtls_cipher_update()
670 return mbedtls_ccm_update((mbedtls_ccm_context *) ctx->cipher_ctx, in mbedtls_cipher_update()
679 return mbedtls_chachapoly_update((mbedtls_chachapoly_context *) ctx->cipher_ctx, in mbedtls_cipher_update()
718 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->cbc_func(ctx->cipher_ctx, in mbedtls_cipher_update()
761 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->cbc_func(ctx->cipher_ctx, in mbedtls_cipher_update()
778 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->cfb_func(ctx->cipher_ctx, in mbedtls_cipher_update()
794 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->ofb_func(ctx->cipher_ctx, in mbedtls_cipher_update()
810 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->ctr_func(ctx->cipher_ctx, in mbedtls_cipher_update()
832 ret = mbedtls_cipher_get_base(ctx->cipher_info)->xts_func(ctx->cipher_ctx, in mbedtls_cipher_update()
850 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->stream_func(ctx->cipher_ctx, in mbedtls_cipher_update()
1139 if (0 != (ret = mbedtls_cipher_get_base(ctx->cipher_info)->cbc_func(ctx->cipher_ctx, in mbedtls_cipher_finish()
1252 return mbedtls_gcm_finish((mbedtls_gcm_context *) ctx->cipher_ctx, in mbedtls_cipher_write_tag()
1266 (mbedtls_chachapoly_context *) ctx->cipher_ctx, tag); in mbedtls_cipher_write_tag()
1310 (mbedtls_gcm_context *) ctx->cipher_ctx, in mbedtls_cipher_check_tag()
1332 (mbedtls_chachapoly_context *) ctx->cipher_ctx, check_tag); in mbedtls_cipher_check_tag()
1370 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_crypt()
1465 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_aead_encrypt()
1493 return mbedtls_gcm_crypt_and_tag(ctx->cipher_ctx, MBEDTLS_GCM_ENCRYPT, in mbedtls_cipher_aead_encrypt()
1501 return mbedtls_ccm_encrypt_and_tag(ctx->cipher_ctx, ilen, in mbedtls_cipher_aead_encrypt()
1515 return mbedtls_chachapoly_encrypt_and_tag(ctx->cipher_ctx, in mbedtls_cipher_aead_encrypt()
1542 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_aead_decrypt()
1573 ret = mbedtls_gcm_auth_decrypt(ctx->cipher_ctx, ilen, in mbedtls_cipher_aead_decrypt()
1589 ret = mbedtls_ccm_auth_decrypt(ctx->cipher_ctx, ilen, in mbedtls_cipher_aead_decrypt()
1611 ret = mbedtls_chachapoly_auth_decrypt(ctx->cipher_ctx, ilen, in mbedtls_cipher_aead_decrypt()
1657 return mbedtls_nist_kw_wrap(ctx->cipher_ctx, mode, input, ilen, in mbedtls_cipher_auth_encrypt_ext()
1708 return mbedtls_nist_kw_unwrap(ctx->cipher_ctx, mode, input, ilen, in mbedtls_cipher_auth_decrypt_ext()