Lines Matching refs:aectx
21 struct crypto_authenc_ctx aectx; member
34 ctx->aectx.ops = &aes_ccm_ops; in crypto_aes_ccm_alloc_ctx()
36 *ctx_ret = &ctx->aectx; in crypto_aes_ccm_alloc_ctx()
40 static struct tee_ccm_state *to_tee_ccm_state(struct crypto_authenc_ctx *aectx) in to_tee_ccm_state() argument
42 assert(aectx && aectx->ops == &aes_ccm_ops); in to_tee_ccm_state()
44 return container_of(aectx, struct tee_ccm_state, aectx); in to_tee_ccm_state()
47 static void crypto_aes_ccm_free_ctx(struct crypto_authenc_ctx *aectx) in crypto_aes_ccm_free_ctx() argument
49 free(to_tee_ccm_state(aectx)); in crypto_aes_ccm_free_ctx()
62 static TEE_Result crypto_aes_ccm_init(struct crypto_authenc_ctx *aectx, in crypto_aes_ccm_init() argument
71 struct tee_ccm_state *ccm = to_tee_ccm_state(aectx); in crypto_aes_ccm_init()
110 static TEE_Result crypto_aes_ccm_update_aad(struct crypto_authenc_ctx *aectx, in crypto_aes_ccm_update_aad() argument
113 struct tee_ccm_state *ccm = to_tee_ccm_state(aectx); in crypto_aes_ccm_update_aad()
125 crypto_aes_ccm_update_payload(struct crypto_authenc_ctx *aectx, in crypto_aes_ccm_update_payload() argument
131 struct tee_ccm_state *ccm = to_tee_ccm_state(aectx); in crypto_aes_ccm_update_payload()
151 static TEE_Result crypto_aes_ccm_enc_final(struct crypto_authenc_ctx *aectx, in crypto_aes_ccm_enc_final() argument
158 struct tee_ccm_state *ccm = to_tee_ccm_state(aectx); in crypto_aes_ccm_enc_final()
162 res = crypto_aes_ccm_update_payload(aectx, TEE_MODE_ENCRYPT, src_data, in crypto_aes_ccm_enc_final()
183 static TEE_Result crypto_aes_ccm_dec_final(struct crypto_authenc_ctx *aectx, in crypto_aes_ccm_dec_final() argument
189 struct tee_ccm_state *ccm = to_tee_ccm_state(aectx); in crypto_aes_ccm_dec_final()
200 res = crypto_aes_ccm_update_payload(aectx, TEE_MODE_DECRYPT, src_data, in crypto_aes_ccm_dec_final()
217 static void crypto_aes_ccm_final(struct crypto_authenc_ctx *aectx) in crypto_aes_ccm_final() argument
219 ccm_reset(&to_tee_ccm_state(aectx)->ctx); in crypto_aes_ccm_final()