Lines Matching refs:req
57 * the req->dst_len will be updated to the size required for the
64 * the req->dst_len will be updated to the size required for the
68 * the req->dst_len will be updated to the size required for the
93 int (*sign)(struct akcipher_request *req);
94 int (*verify)(struct akcipher_request *req);
95 int (*encrypt)(struct akcipher_request *req);
96 int (*decrypt)(struct akcipher_request *req);
161 static inline void akcipher_request_set_tfm(struct akcipher_request *req,
164 req->base.tfm = crypto_akcipher_tfm(tfm);
168 struct akcipher_request *req)
170 return __crypto_akcipher_tfm(req->base.tfm);
196 struct akcipher_request *req;
198 req = kmalloc(sizeof(*req) + crypto_akcipher_reqsize(tfm), gfp);
199 if (likely(req))
200 akcipher_request_set_tfm(req, tfm);
202 return req;
208 * @req: request to free
210 static inline void akcipher_request_free(struct akcipher_request *req)
212 kfree_sensitive(req);
221 * @req: request that the callback will be set for
226 static inline void akcipher_request_set_callback(struct akcipher_request *req,
231 req->base.complete = cmpl;
232 req->base.data = data;
233 req->base.flags = flgs;
241 * @req: public key request
248 static inline void akcipher_request_set_crypt(struct akcipher_request *req,
254 req->src = src;
255 req->dst = dst;
256 req->src_len = src_len;
257 req->dst_len = dst_len;
283 * @req: asymmetric key request
287 static inline int crypto_akcipher_encrypt(struct akcipher_request *req)
289 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req);
292 unsigned int src_len = req->src_len;
296 ret = alg->encrypt(req);
307 * @req: asymmetric key request
311 static inline int crypto_akcipher_decrypt(struct akcipher_request *req)
313 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req);
316 unsigned int src_len = req->src_len;
320 ret = alg->decrypt(req);
331 * @req: asymmetric key request
335 static inline int crypto_akcipher_sign(struct akcipher_request *req)
337 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req);
343 ret = alg->sign(req);
354 * @req: asymmetric key request
356 * Note: req->dst should be NULL, req->src should point to SG of size
357 * (req->src_size + req->dst_size), containing signature (of req->src_size
358 * length) with appended digest (of req->dst_size length).
362 static inline int crypto_akcipher_verify(struct akcipher_request *req)
364 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req);
370 ret = alg->verify(req);