Lines Matching refs:pctx
154 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
158 memset(pctx->auth_tag, 0, sizeof(pctx->auth_tag));
159 memcpy(pctx->iv, req->iv, GCM_AES_IV_SIZE);
160 memcpy(pctx->iv + GCM_AES_IV_SIZE, &counter, 4);
162 sg_init_table(pctx->src, 3);
163 sg_set_buf(pctx->src, pctx->auth_tag, sizeof(pctx->auth_tag));
164 sg = scatterwalk_ffwd(pctx->src + 1, req->src, req->assoclen);
165 if (sg != pctx->src + 1)
166 sg_chain(pctx->src, 2, sg);
169 sg_init_table(pctx->dst, 3);
170 sg_set_buf(pctx->dst, pctx->auth_tag, sizeof(pctx->auth_tag));
171 sg = scatterwalk_ffwd(pctx->dst + 1, req->dst, req->assoclen);
172 if (sg != pctx->dst + 1)
173 sg_chain(pctx->dst, 2, sg);
182 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
183 struct skcipher_request *skreq = &pctx->u.skreq;
186 dst = req->src == req->dst ? pctx->src : pctx->dst;
189 skcipher_request_set_crypt(skreq, pctx->src, dst,
190 cryptlen + sizeof(pctx->auth_tag),
191 pctx->iv);
207 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
208 struct ahash_request *ahreq = &pctx->u.ahreq;
225 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
226 struct ahash_request *ahreq = &pctx->u.ahreq;
227 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
232 memcpy(pctx->iauth_tag, &lengths, 16);
233 sg_init_one(&pctx->sg, pctx->iauth_tag, 16);
235 ahash_request_set_crypt(ahreq, &pctx->sg,
236 pctx->iauth_tag, sizeof(lengths));
243 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
244 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
288 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
289 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
318 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
319 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
400 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
401 struct ahash_request *ahreq = &pctx->u.ahreq;
413 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
415 u8 *auth_tag = pctx->auth_tag;
417 crypto_xor(auth_tag, pctx->iauth_tag, 16);
426 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
427 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
429 gctx->src = sg_next(req->src == req->dst ? pctx->src : pctx->dst);
453 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
454 struct skcipher_request *skreq = &pctx->u.skreq;
467 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
469 u8 *auth_tag = pctx->auth_tag;
470 u8 *iauth_tag = pctx->iauth_tag;
492 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
493 struct skcipher_request *skreq = &pctx->u.skreq;
494 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
504 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
505 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
514 gctx->src = sg_next(pctx->src);