Home
last modified time | relevance | path

Searched refs:pctx (Results 1 – 3 of 3) sorted by relevance

/crypto/
Dalgif_rng.c204 struct rng_parent_ctx *pctx; in rng_bind() local
207 pctx = kzalloc(sizeof(*pctx), GFP_KERNEL); in rng_bind()
208 if (!pctx) in rng_bind()
213 kfree(pctx); in rng_bind()
217 pctx->drng = rng; in rng_bind()
218 return pctx; in rng_bind()
223 struct rng_parent_ctx *pctx = private; in rng_release() local
225 if (unlikely(!pctx)) in rng_release()
227 crypto_free_rng(pctx->drng); in rng_release()
228 kfree_sensitive(pctx->entropy); in rng_release()
[all …]
Dgcm.c154 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()
[all …]
Dccm.c171 struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req); in crypto_ccm_auth() local
174 struct ahash_request *ahreq = &pctx->ahreq; in crypto_ccm_auth()
177 u8 *odata = pctx->odata; in crypto_ccm_auth()
178 u8 *idata = pctx->idata; in crypto_ccm_auth()
200 ahash_request_set_callback(ahreq, pctx->flags, NULL, NULL); in crypto_ccm_auth()
221 ahash_request_set_crypt(ahreq, plain, pctx->odata, cryptlen); in crypto_ccm_auth()
231 struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req); in crypto_ccm_encrypt_done() local
232 u8 *odata = pctx->odata; in crypto_ccm_encrypt_done()
252 struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req); in crypto_ccm_init_crypt() local
261 pctx->flags = aead_request_flags(req); in crypto_ccm_init_crypt()
[all …]