• Home
  • Raw
  • Download

Lines Matching refs:pctx

160 	struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);  in crypto_gcm_init_common()  local
164 memset(pctx->auth_tag, 0, sizeof(pctx->auth_tag)); in crypto_gcm_init_common()
165 memcpy(pctx->iv, req->iv, GCM_AES_IV_SIZE); in crypto_gcm_init_common()
166 memcpy(pctx->iv + GCM_AES_IV_SIZE, &counter, 4); in crypto_gcm_init_common()
168 sg_init_table(pctx->src, 3); in crypto_gcm_init_common()
169 sg_set_buf(pctx->src, pctx->auth_tag, sizeof(pctx->auth_tag)); in crypto_gcm_init_common()
170 sg = scatterwalk_ffwd(pctx->src + 1, req->src, req->assoclen); in crypto_gcm_init_common()
171 if (sg != pctx->src + 1) in crypto_gcm_init_common()
172 sg_chain(pctx->src, 2, sg); in crypto_gcm_init_common()
175 sg_init_table(pctx->dst, 3); in crypto_gcm_init_common()
176 sg_set_buf(pctx->dst, pctx->auth_tag, sizeof(pctx->auth_tag)); in crypto_gcm_init_common()
177 sg = scatterwalk_ffwd(pctx->dst + 1, req->dst, req->assoclen); in crypto_gcm_init_common()
178 if (sg != pctx->dst + 1) in crypto_gcm_init_common()
179 sg_chain(pctx->dst, 2, sg); in crypto_gcm_init_common()
188 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in crypto_gcm_init_crypt() local
189 struct skcipher_request *skreq = &pctx->u.skreq; in crypto_gcm_init_crypt()
192 dst = req->src == req->dst ? pctx->src : pctx->dst; in crypto_gcm_init_crypt()
195 skcipher_request_set_crypt(skreq, pctx->src, dst, in crypto_gcm_init_crypt()
196 cryptlen + sizeof(pctx->auth_tag), in crypto_gcm_init_crypt()
197 pctx->iv); in crypto_gcm_init_crypt()
213 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_hash_update() local
214 struct ahash_request *ahreq = &pctx->u.ahreq; in gcm_hash_update()
231 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_hash_len() local
232 struct ahash_request *ahreq = &pctx->u.ahreq; in gcm_hash_len()
233 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in gcm_hash_len()
238 memcpy(pctx->iauth_tag, &lengths, 16); in gcm_hash_len()
239 sg_init_one(&pctx->sg, pctx->iauth_tag, 16); in gcm_hash_len()
241 ahash_request_set_crypt(ahreq, &pctx->sg, in gcm_hash_len()
242 pctx->iauth_tag, sizeof(lengths)); in gcm_hash_len()
249 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_hash_len_continue() local
250 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in gcm_hash_len_continue()
294 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_hash_crypt_continue() local
295 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in gcm_hash_crypt_continue()
324 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_hash_assoc_remain_continue() local
325 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in gcm_hash_assoc_remain_continue()
406 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_hash() local
407 struct ahash_request *ahreq = &pctx->u.ahreq; in gcm_hash()
419 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_enc_copy_hash() local
421 u8 *auth_tag = pctx->auth_tag; in gcm_enc_copy_hash()
423 crypto_xor(auth_tag, pctx->iauth_tag, 16); in gcm_enc_copy_hash()
432 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_encrypt_continue() local
433 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in gcm_encrypt_continue()
435 gctx->src = sg_next(req->src == req->dst ? pctx->src : pctx->dst); in gcm_encrypt_continue()
459 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in crypto_gcm_encrypt() local
460 struct skcipher_request *skreq = &pctx->u.skreq; in crypto_gcm_encrypt()
473 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in crypto_gcm_verify() local
475 u8 *auth_tag = pctx->auth_tag; in crypto_gcm_verify()
476 u8 *iauth_tag = pctx->iauth_tag; in crypto_gcm_verify()
498 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in gcm_dec_hash_continue() local
499 struct skcipher_request *skreq = &pctx->u.skreq; in gcm_dec_hash_continue()
500 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in gcm_dec_hash_continue()
510 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); in crypto_gcm_decrypt() local
511 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; in crypto_gcm_decrypt()
520 gctx->src = sg_next(pctx->src); in crypto_gcm_decrypt()