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;
287 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
288 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
317 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
318 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
398 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
399 struct ahash_request *ahreq = &pctx->u.ahreq;
411 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
413 u8 *auth_tag = pctx->auth_tag;
415 crypto_xor(auth_tag, pctx->iauth_tag, 16);
424 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
425 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
427 gctx->src = sg_next(req->src == req->dst ? pctx->src : pctx->dst);
451 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
452 struct skcipher_request *skreq = &pctx->u.skreq;
465 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
467 u8 *auth_tag = pctx->auth_tag;
468 u8 *iauth_tag = pctx->iauth_tag;
490 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
491 struct skcipher_request *skreq = &pctx->u.skreq;
492 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
502 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
503 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
512 gctx->src = sg_next(pctx->src);