Lines Matching refs:pctx

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