Lines Matching refs:req

53 static void authenc_esn_request_complete(struct aead_request *req, int err)  in authenc_esn_request_complete()  argument
56 aead_request_complete(req, err); in authenc_esn_request_complete()
99 struct aead_request *req = areq->data; in authenc_esn_geniv_ahash_update_done() local
100 struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req); in authenc_esn_geniv_ahash_update_done()
102 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in authenc_esn_geniv_ahash_update_done()
110 ahash_request_set_callback(ahreq, aead_request_flags(req) & in authenc_esn_geniv_ahash_update_done()
112 areq_ctx->update_complete2, req); in authenc_esn_geniv_ahash_update_done()
120 ahash_request_set_callback(ahreq, aead_request_flags(req) & in authenc_esn_geniv_ahash_update_done()
122 areq_ctx->complete, req); in authenc_esn_geniv_ahash_update_done()
133 authenc_esn_request_complete(req, err); in authenc_esn_geniv_ahash_update_done()
139 struct aead_request *req = areq->data; in authenc_esn_geniv_ahash_update_done2() local
140 struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req); in authenc_esn_geniv_ahash_update_done2()
142 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in authenc_esn_geniv_ahash_update_done2()
150 ahash_request_set_callback(ahreq, aead_request_flags(req) & in authenc_esn_geniv_ahash_update_done2()
152 areq_ctx->complete, req); in authenc_esn_geniv_ahash_update_done2()
163 authenc_esn_request_complete(req, err); in authenc_esn_geniv_ahash_update_done2()
170 struct aead_request *req = areq->data; in authenc_esn_geniv_ahash_done() local
171 struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req); in authenc_esn_geniv_ahash_done()
173 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in authenc_esn_geniv_ahash_done()
184 aead_request_complete(req, err); in authenc_esn_geniv_ahash_done()
194 struct aead_request *req = areq->data; in authenc_esn_verify_ahash_update_done() local
195 struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req); in authenc_esn_verify_ahash_update_done()
197 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in authenc_esn_verify_ahash_update_done()
199 unsigned int cryptlen = req->cryptlen; in authenc_esn_verify_ahash_update_done()
208 aead_request_flags(req) & in authenc_esn_verify_ahash_update_done()
210 areq_ctx->update_complete2, req); in authenc_esn_verify_ahash_update_done()
218 ahash_request_set_callback(ahreq, aead_request_flags(req) & in authenc_esn_verify_ahash_update_done()
220 areq_ctx->complete, req); in authenc_esn_verify_ahash_update_done()
236 abreq = aead_request_ctx(req); in authenc_esn_verify_ahash_update_done()
238 ablkcipher_request_set_callback(abreq, aead_request_flags(req), in authenc_esn_verify_ahash_update_done()
239 req->base.complete, req->base.data); in authenc_esn_verify_ahash_update_done()
240 ablkcipher_request_set_crypt(abreq, req->src, req->dst, in authenc_esn_verify_ahash_update_done()
241 cryptlen, req->iv); in authenc_esn_verify_ahash_update_done()
246 authenc_esn_request_complete(req, err); in authenc_esn_verify_ahash_update_done()
255 struct aead_request *req = areq->data; in authenc_esn_verify_ahash_update_done2() local
256 struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req); in authenc_esn_verify_ahash_update_done2()
258 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in authenc_esn_verify_ahash_update_done2()
260 unsigned int cryptlen = req->cryptlen; in authenc_esn_verify_ahash_update_done2()
267 ahash_request_set_callback(ahreq, aead_request_flags(req) & in authenc_esn_verify_ahash_update_done2()
269 areq_ctx->complete, req); in authenc_esn_verify_ahash_update_done2()
285 abreq = aead_request_ctx(req); in authenc_esn_verify_ahash_update_done2()
287 ablkcipher_request_set_callback(abreq, aead_request_flags(req), in authenc_esn_verify_ahash_update_done2()
288 req->base.complete, req->base.data); in authenc_esn_verify_ahash_update_done2()
289 ablkcipher_request_set_crypt(abreq, req->src, req->dst, in authenc_esn_verify_ahash_update_done2()
290 cryptlen, req->iv); in authenc_esn_verify_ahash_update_done2()
295 authenc_esn_request_complete(req, err); in authenc_esn_verify_ahash_update_done2()
305 struct aead_request *req = areq->data; in authenc_esn_verify_ahash_done() local
306 struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req); in authenc_esn_verify_ahash_done()
308 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in authenc_esn_verify_ahash_done()
310 unsigned int cryptlen = req->cryptlen; in authenc_esn_verify_ahash_done()
325 abreq = aead_request_ctx(req); in authenc_esn_verify_ahash_done()
327 ablkcipher_request_set_callback(abreq, aead_request_flags(req), in authenc_esn_verify_ahash_done()
328 req->base.complete, req->base.data); in authenc_esn_verify_ahash_done()
329 ablkcipher_request_set_crypt(abreq, req->src, req->dst, in authenc_esn_verify_ahash_done()
330 cryptlen, req->iv); in authenc_esn_verify_ahash_done()
335 authenc_esn_request_complete(req, err); in authenc_esn_verify_ahash_done()
338 static u8 *crypto_authenc_esn_ahash(struct aead_request *req, in crypto_authenc_esn_ahash() argument
341 struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req); in crypto_authenc_esn_ahash()
344 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_esn_ahash()
359 ahash_request_set_callback(ahreq, aead_request_flags(req) & flags, in crypto_authenc_esn_ahash()
360 areq_ctx->update_complete, req); in crypto_authenc_esn_ahash()
367 ahash_request_set_callback(ahreq, aead_request_flags(req) & flags, in crypto_authenc_esn_ahash()
368 areq_ctx->update_complete2, req); in crypto_authenc_esn_ahash()
376 ahash_request_set_callback(ahreq, aead_request_flags(req) & flags, in crypto_authenc_esn_ahash()
377 areq_ctx->complete, req); in crypto_authenc_esn_ahash()
386 static int crypto_authenc_esn_genicv(struct aead_request *req, u8 *iv, in crypto_authenc_esn_genicv() argument
389 struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req); in crypto_authenc_esn_genicv()
390 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_esn_genicv()
391 struct scatterlist *dst = req->dst; in crypto_authenc_esn_genicv()
392 struct scatterlist *assoc = req->assoc; in crypto_authenc_esn_genicv()
399 unsigned int cryptlen = req->cryptlen; in crypto_authenc_esn_genicv()
442 hash = crypto_authenc_esn_ahash(req, flags); in crypto_authenc_esn_genicv()
452 static void crypto_authenc_esn_encrypt_done(struct crypto_async_request *req, in crypto_authenc_esn_encrypt_done() argument
455 struct aead_request *areq = req->data; in crypto_authenc_esn_encrypt_done()
470 static int crypto_authenc_esn_encrypt(struct aead_request *req) in crypto_authenc_esn_encrypt() argument
472 struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req); in crypto_authenc_esn_encrypt()
474 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_esn_encrypt()
476 struct scatterlist *dst = req->dst; in crypto_authenc_esn_encrypt()
477 unsigned int cryptlen = req->cryptlen; in crypto_authenc_esn_encrypt()
484 ablkcipher_request_set_callback(abreq, aead_request_flags(req), in crypto_authenc_esn_encrypt()
485 crypto_authenc_esn_encrypt_done, req); in crypto_authenc_esn_encrypt()
486 ablkcipher_request_set_crypt(abreq, req->src, dst, cryptlen, req->iv); in crypto_authenc_esn_encrypt()
488 memcpy(iv, req->iv, crypto_aead_ivsize(authenc_esn)); in crypto_authenc_esn_encrypt()
494 return crypto_authenc_esn_genicv(req, iv, CRYPTO_TFM_REQ_MAY_SLEEP); in crypto_authenc_esn_encrypt()
497 static void crypto_authenc_esn_givencrypt_done(struct crypto_async_request *req, in crypto_authenc_esn_givencrypt_done() argument
500 struct aead_request *areq = req->data; in crypto_authenc_esn_givencrypt_done()
511 static int crypto_authenc_esn_givencrypt(struct aead_givcrypt_request *req) in crypto_authenc_esn_givencrypt() argument
513 struct crypto_aead *authenc_esn = aead_givcrypt_reqtfm(req); in crypto_authenc_esn_givencrypt()
515 struct aead_request *areq = &req->areq; in crypto_authenc_esn_givencrypt()
517 u8 *iv = req->giv; in crypto_authenc_esn_givencrypt()
525 skcipher_givcrypt_set_giv(greq, iv, req->seq); in crypto_authenc_esn_givencrypt()
534 static int crypto_authenc_esn_verify(struct aead_request *req) in crypto_authenc_esn_verify() argument
536 struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req); in crypto_authenc_esn_verify()
537 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_esn_verify()
545 ohash = crypto_authenc_esn_ahash(req, CRYPTO_TFM_REQ_MAY_SLEEP); in crypto_authenc_esn_verify()
556 static int crypto_authenc_esn_iverify(struct aead_request *req, u8 *iv, in crypto_authenc_esn_iverify() argument
559 struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req); in crypto_authenc_esn_iverify()
560 struct authenc_esn_request_ctx *areq_ctx = aead_request_ctx(req); in crypto_authenc_esn_iverify()
561 struct scatterlist *src = req->src; in crypto_authenc_esn_iverify()
562 struct scatterlist *assoc = req->assoc; in crypto_authenc_esn_iverify()
610 return crypto_authenc_esn_verify(req); in crypto_authenc_esn_iverify()
613 static int crypto_authenc_esn_decrypt(struct aead_request *req) in crypto_authenc_esn_decrypt() argument
615 struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req); in crypto_authenc_esn_decrypt()
617 struct ablkcipher_request *abreq = aead_request_ctx(req); in crypto_authenc_esn_decrypt()
618 unsigned int cryptlen = req->cryptlen; in crypto_authenc_esn_decrypt()
620 u8 *iv = req->iv; in crypto_authenc_esn_decrypt()
627 err = crypto_authenc_esn_iverify(req, iv, cryptlen); in crypto_authenc_esn_decrypt()
632 ablkcipher_request_set_callback(abreq, aead_request_flags(req), in crypto_authenc_esn_decrypt()
633 req->base.complete, req->base.data); in crypto_authenc_esn_decrypt()
634 ablkcipher_request_set_crypt(abreq, req->src, req->dst, cryptlen, iv); in crypto_authenc_esn_decrypt()