Lines Matching full:gcm
20 gcm_state ctx; /* the gcm state as defined by LTC */
70 struct tee_gcm_state *gcm = to_tee_gcm_state(aectx); in crypto_aes_gcm_init() local
76 memset(&gcm->ctx, 0, sizeof(gcm->ctx)); in crypto_aes_gcm_init()
77 gcm->tag_len = tag_len; in crypto_aes_gcm_init()
79 ltc_res = gcm_init(&gcm->ctx, ltc_cipherindex, key, key_len); in crypto_aes_gcm_init()
84 ltc_res = gcm_add_iv(&gcm->ctx, nonce, nonce_len); in crypto_aes_gcm_init()
94 struct tee_gcm_state *gcm = to_tee_gcm_state(aectx); in crypto_aes_gcm_update_aad() local
98 ltc_res = gcm_add_aad(&gcm->ctx, data, len); in crypto_aes_gcm_update_aad()
113 struct tee_gcm_state *gcm = to_tee_gcm_state(aectx); in crypto_aes_gcm_update_payload() local
128 if (gcm->ctx.mode == LTC_GCM_MODE_IV) { in crypto_aes_gcm_update_payload()
135 ltc_res = gcm_process(&gcm->ctx, pt, len, ct, dir); in crypto_aes_gcm_update_payload()
148 struct tee_gcm_state *gcm = to_tee_gcm_state(aectx); in crypto_aes_gcm_enc_final() local
158 if (*dst_tag_len < gcm->tag_len) { in crypto_aes_gcm_enc_final()
159 *dst_tag_len = gcm->tag_len; in crypto_aes_gcm_enc_final()
162 *dst_tag_len = gcm->tag_len; in crypto_aes_gcm_enc_final()
165 ltc_res = gcm_done(&gcm->ctx, dst_tag, (unsigned long *)dst_tag_len); in crypto_aes_gcm_enc_final()
178 struct tee_gcm_state *gcm = to_tee_gcm_state(aectx); in crypto_aes_gcm_dec_final() local
195 ltc_res = gcm_done(&gcm->ctx, dst_tag, <c_tag_len); in crypto_aes_gcm_dec_final()