Lines Matching refs:req

58 	int (*encrypt)(struct skcipher_request *req);
59 int (*decrypt)(struct skcipher_request *req);
75 struct skcipher_givcrypt_request *req) in skcipher_givcrypt_reqtfm() argument
77 return crypto_ablkcipher_reqtfm(&req->creq); in skcipher_givcrypt_reqtfm()
81 struct skcipher_givcrypt_request *req) in crypto_skcipher_givencrypt() argument
84 crypto_ablkcipher_crt(skcipher_givcrypt_reqtfm(req)); in crypto_skcipher_givencrypt()
85 return crt->givencrypt(req); in crypto_skcipher_givencrypt()
89 struct skcipher_givcrypt_request *req) in crypto_skcipher_givdecrypt() argument
92 crypto_ablkcipher_crt(skcipher_givcrypt_reqtfm(req)); in crypto_skcipher_givdecrypt()
93 return crt->givdecrypt(req); in crypto_skcipher_givdecrypt()
97 struct skcipher_givcrypt_request *req, struct crypto_ablkcipher *tfm) in skcipher_givcrypt_set_tfm() argument
99 req->creq.base.tfm = crypto_ablkcipher_tfm(tfm); in skcipher_givcrypt_set_tfm()
103 struct crypto_async_request *req) in skcipher_givcrypt_cast() argument
105 return container_of(ablkcipher_request_cast(req), in skcipher_givcrypt_cast()
112 struct skcipher_givcrypt_request *req; in skcipher_givcrypt_alloc() local
114 req = kmalloc(sizeof(struct skcipher_givcrypt_request) + in skcipher_givcrypt_alloc()
117 if (likely(req)) in skcipher_givcrypt_alloc()
118 skcipher_givcrypt_set_tfm(req, tfm); in skcipher_givcrypt_alloc()
120 return req; in skcipher_givcrypt_alloc()
123 static inline void skcipher_givcrypt_free(struct skcipher_givcrypt_request *req) in skcipher_givcrypt_free() argument
125 kfree(req); in skcipher_givcrypt_free()
129 struct skcipher_givcrypt_request *req, u32 flags, in skcipher_givcrypt_set_callback() argument
132 ablkcipher_request_set_callback(&req->creq, flags, compl, data); in skcipher_givcrypt_set_callback()
136 struct skcipher_givcrypt_request *req, in skcipher_givcrypt_set_crypt() argument
140 ablkcipher_request_set_crypt(&req->creq, src, dst, nbytes, iv); in skcipher_givcrypt_set_crypt()
144 struct skcipher_givcrypt_request *req, u8 *giv, u64 seq) in skcipher_givcrypt_set_giv() argument
146 req->giv = giv; in skcipher_givcrypt_set_giv()
147 req->seq = seq; in skcipher_givcrypt_set_giv()
325 struct skcipher_request *req) in crypto_skcipher_reqtfm() argument
327 return __crypto_skcipher_cast(req->base.tfm); in crypto_skcipher_reqtfm()
341 static inline int crypto_skcipher_encrypt(struct skcipher_request *req) in crypto_skcipher_encrypt() argument
343 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_skcipher_encrypt()
345 return tfm->encrypt(req); in crypto_skcipher_encrypt()
359 static inline int crypto_skcipher_decrypt(struct skcipher_request *req) in crypto_skcipher_decrypt() argument
361 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_skcipher_decrypt()
363 return tfm->decrypt(req); in crypto_skcipher_decrypt()
396 static inline void skcipher_request_set_tfm(struct skcipher_request *req, in skcipher_request_set_tfm() argument
399 req->base.tfm = crypto_skcipher_tfm(tfm); in skcipher_request_set_tfm()
403 struct crypto_async_request *req) in skcipher_request_cast() argument
405 return container_of(req, struct skcipher_request, base); in skcipher_request_cast()
423 struct skcipher_request *req; in skcipher_request_alloc() local
425 req = kmalloc(sizeof(struct skcipher_request) + in skcipher_request_alloc()
428 if (likely(req)) in skcipher_request_alloc()
429 skcipher_request_set_tfm(req, tfm); in skcipher_request_alloc()
431 return req; in skcipher_request_alloc()
438 static inline void skcipher_request_free(struct skcipher_request *req) in skcipher_request_free() argument
440 kzfree(req); in skcipher_request_free()
468 static inline void skcipher_request_set_callback(struct skcipher_request *req, in skcipher_request_set_callback() argument
473 req->base.complete = compl; in skcipher_request_set_callback()
474 req->base.data = data; in skcipher_request_set_callback()
475 req->base.flags = flags; in skcipher_request_set_callback()
495 struct skcipher_request *req, in skcipher_request_set_crypt() argument
499 req->src = src; in skcipher_request_set_crypt()
500 req->dst = dst; in skcipher_request_set_crypt()
501 req->cryptlen = cryptlen; in skcipher_request_set_crypt()
502 req->iv = iv; in skcipher_request_set_crypt()