Lines Matching refs:gcm_ctx
133 gcm_ctx_t *gcm_ctx; in aes_gcm_ctx_init() local
135 if ((gcm_ctx = kmem_zalloc(sizeof (gcm_ctx_t), KM_SLEEP)) == NULL) in aes_gcm_ctx_init()
138 gcm_ctx->gcm_keysched = key_sched; in aes_gcm_ctx_init()
139 gcm_ctx->gcm_keysched_len = size; in aes_gcm_ctx_init()
141 if (gcm_init_ctx(gcm_ctx, (char *)param, AES_BLOCK_LEN, in aes_gcm_ctx_init()
144 kmem_free(gcm_ctx, sizeof (gcm_ctx_t)); in aes_gcm_ctx_init()
147 gcm_ctx->gcm_flags |= GCM_MODE; in aes_gcm_ctx_init()
149 return (gcm_ctx); in aes_gcm_ctx_init()
156 gcm_ctx_t *gcm_ctx; in aes_gmac_ctx_init() local
158 if ((gcm_ctx = kmem_zalloc(sizeof (gcm_ctx_t), KM_SLEEP)) == NULL) in aes_gmac_ctx_init()
161 gcm_ctx->gcm_keysched = key_sched; in aes_gmac_ctx_init()
162 gcm_ctx->gcm_keysched_len = size; in aes_gmac_ctx_init()
164 if (gmac_init_ctx(gcm_ctx, (char *)param, AES_BLOCK_LEN, in aes_gmac_ctx_init()
167 kmem_free(gcm_ctx, sizeof (gcm_ctx_t)); in aes_gmac_ctx_init()
170 gcm_ctx->gcm_flags |= GMAC_MODE; in aes_gmac_ctx_init()
172 return (gcm_ctx); in aes_gmac_ctx_init()
521 gcm_ctx_t *gcm_ctx = soft_aes_ctx->aes_cbc; in fips_aes_encrypt() local
555 out.cd_offset = gcm_ctx->gcm_processed_data_len; in fips_aes_encrypt()
556 out.cd_length = saved_length - gcm_ctx->gcm_processed_data_len; in fips_aes_encrypt()