Lines Matching refs:aectx
19 struct crypto_authenc_ctx aectx; member
26 static struct tee_gcm_state *to_tee_gcm_state(struct crypto_authenc_ctx *aectx) in to_tee_gcm_state() argument
28 assert(aectx && aectx->ops == &aes_gcm_ops); in to_tee_gcm_state()
30 return container_of(aectx, struct tee_gcm_state, aectx); in to_tee_gcm_state()
39 ctx->aectx.ops = &aes_gcm_ops; in crypto_aes_gcm_alloc_ctx()
41 *ctx_ret = &ctx->aectx; in crypto_aes_gcm_alloc_ctx()
46 static void crypto_aes_gcm_free_ctx(struct crypto_authenc_ctx *aectx) in crypto_aes_gcm_free_ctx() argument
48 free(to_tee_gcm_state(aectx)); in crypto_aes_gcm_free_ctx()
61 static TEE_Result crypto_aes_gcm_init(struct crypto_authenc_ctx *aectx, in crypto_aes_gcm_init() argument
70 struct tee_gcm_state *gcm = to_tee_gcm_state(aectx); in crypto_aes_gcm_init()
91 static TEE_Result crypto_aes_gcm_update_aad(struct crypto_authenc_ctx *aectx, in crypto_aes_gcm_update_aad() argument
94 struct tee_gcm_state *gcm = to_tee_gcm_state(aectx); in crypto_aes_gcm_update_aad()
106 crypto_aes_gcm_update_payload(struct crypto_authenc_ctx *aectx, in crypto_aes_gcm_update_payload() argument
113 struct tee_gcm_state *gcm = to_tee_gcm_state(aectx); in crypto_aes_gcm_update_payload()
129 res = crypto_aes_gcm_update_aad(aectx, NULL, 0); in crypto_aes_gcm_update_payload()
142 static TEE_Result crypto_aes_gcm_enc_final(struct crypto_authenc_ctx *aectx, in crypto_aes_gcm_enc_final() argument
148 struct tee_gcm_state *gcm = to_tee_gcm_state(aectx); in crypto_aes_gcm_enc_final()
152 res = crypto_aes_gcm_update_payload(aectx, TEE_MODE_ENCRYPT, src_data, in crypto_aes_gcm_enc_final()
172 static TEE_Result crypto_aes_gcm_dec_final(struct crypto_authenc_ctx *aectx, in crypto_aes_gcm_dec_final() argument
178 struct tee_gcm_state *gcm = to_tee_gcm_state(aectx); in crypto_aes_gcm_dec_final()
189 res = crypto_aes_gcm_update_payload(aectx, TEE_MODE_DECRYPT, src_data, in crypto_aes_gcm_dec_final()
206 static void crypto_aes_gcm_final(struct crypto_authenc_ctx *aectx) in crypto_aes_gcm_final() argument
208 gcm_reset(&to_tee_gcm_state(aectx)->ctx); in crypto_aes_gcm_final()