Lines Matching refs:pctx
176 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in crypto_gcm_init_common() local
180 memset(pctx->auth_tag, 0, sizeof(pctx->auth_tag)); in crypto_gcm_init_common()
181 memcpy(pctx->iv, req->iv, GCM_AES_IV_SIZE); in crypto_gcm_init_common()
182 memcpy(pctx->iv + GCM_AES_IV_SIZE, &counter, 4); in crypto_gcm_init_common()
184 sg_init_table(pctx->src, 3); in crypto_gcm_init_common()
185 sg_set_buf(pctx->src, pctx->auth_tag, sizeof(pctx->auth_tag)); in crypto_gcm_init_common()
186 sg = scatterwalk_ffwd(pctx->src + 1, req->src, req->assoclen); in crypto_gcm_init_common()
187 if (sg != pctx->src + 1) in crypto_gcm_init_common()
188 sg_chain(pctx->src, 2, sg); in crypto_gcm_init_common()
191 sg_init_table(pctx->dst, 3); in crypto_gcm_init_common()
192 sg_set_buf(pctx->dst, pctx->auth_tag, sizeof(pctx->auth_tag)); in crypto_gcm_init_common()
193 sg = scatterwalk_ffwd(pctx->dst + 1, req->dst, req->assoclen); in crypto_gcm_init_common()
194 if (sg != pctx->dst + 1) in crypto_gcm_init_common()
195 sg_chain(pctx->dst, 2, sg); in crypto_gcm_init_common()
204 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in crypto_gcm_init_crypt() local
205 struct skcipher_request *skreq = &pctx->u.skreq; in crypto_gcm_init_crypt()
208 dst = req->src == req->dst ? pctx->src : pctx->dst; in crypto_gcm_init_crypt()
211 skcipher_request_set_crypt(skreq, pctx->src, dst, in crypto_gcm_init_crypt()
212 cryptlen + sizeof(pctx->auth_tag), in crypto_gcm_init_crypt()
213 pctx->iv); in crypto_gcm_init_crypt()
229 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_hash_update() local
230 struct ahash_request *ahreq = &pctx->u.ahreq; in gcm_hash_update()
247 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_hash_len() local
248 struct ahash_request *ahreq = &pctx->u.ahreq; in gcm_hash_len()
249 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in gcm_hash_len()
254 memcpy(pctx->iauth_tag, &lengths, 16); in gcm_hash_len()
255 sg_init_one(&pctx->sg, pctx->iauth_tag, 16); in gcm_hash_len()
257 ahash_request_set_crypt(ahreq, &pctx->sg, in gcm_hash_len()
258 pctx->iauth_tag, sizeof(lengths)); in gcm_hash_len()
265 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_hash_len_continue() local
266 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in gcm_hash_len_continue()
310 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_hash_crypt_continue() local
311 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in gcm_hash_crypt_continue()
340 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_hash_assoc_remain_continue() local
341 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in gcm_hash_assoc_remain_continue()
422 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_hash() local
423 struct ahash_request *ahreq = &pctx->u.ahreq; in gcm_hash()
435 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_enc_copy_hash() local
437 u8 *auth_tag = pctx->auth_tag; in gcm_enc_copy_hash()
439 crypto_xor(auth_tag, pctx->iauth_tag, 16); in gcm_enc_copy_hash()
448 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_encrypt_continue() local
449 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in gcm_encrypt_continue()
451 gctx->src = sg_next(req->src == req->dst ? pctx->src : pctx->dst); in gcm_encrypt_continue()
475 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in crypto_gcm_encrypt() local
476 struct skcipher_request *skreq = &pctx->u.skreq; in crypto_gcm_encrypt()
489 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in crypto_gcm_verify() local
491 u8 *auth_tag = pctx->auth_tag; in crypto_gcm_verify()
492 u8 *iauth_tag = pctx->iauth_tag; in crypto_gcm_verify()
514 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_dec_hash_continue() local
515 struct skcipher_request *skreq = &pctx->u.skreq; in gcm_dec_hash_continue()
516 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in gcm_dec_hash_continue()
526 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in crypto_gcm_decrypt() local
527 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in crypto_gcm_decrypt()
536 gctx->src = sg_next(pctx->src); in crypto_gcm_decrypt()