Lines Matching refs:skreq

156 static void nitrox_skcipher_callback(struct skcipher_request *skreq,  in nitrox_skcipher_callback()  argument
163 skcipher_request_complete(skreq, err); in nitrox_skcipher_callback()
166 static int nitrox_skcipher_crypt(struct skcipher_request *skreq, bool enc) in nitrox_skcipher_crypt() argument
168 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(skreq); in nitrox_skcipher_crypt()
170 struct nitrox_kcrypt_request *nkreq = skcipher_request_ctx(skreq); in nitrox_skcipher_crypt()
175 creq->flags = skreq->base.flags; in nitrox_skcipher_crypt()
176 creq->gfp = (skreq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ? in nitrox_skcipher_crypt()
184 creq->gph.param0 = cpu_to_be16(skreq->cryptlen); in nitrox_skcipher_crypt()
194 memcpy(creq->iv, skreq->iv, ivsize); in nitrox_skcipher_crypt()
196 creq->src = skreq->src; in nitrox_skcipher_crypt()
197 creq->dst = skreq->dst; in nitrox_skcipher_crypt()
200 nkreq->skreq = skreq; in nitrox_skcipher_crypt()
204 nitrox_skcipher_callback, skreq); in nitrox_skcipher_crypt()
207 static int nitrox_aes_encrypt(struct skcipher_request *skreq) in nitrox_aes_encrypt() argument
209 return nitrox_skcipher_crypt(skreq, true); in nitrox_aes_encrypt()
212 static int nitrox_aes_decrypt(struct skcipher_request *skreq) in nitrox_aes_decrypt() argument
214 return nitrox_skcipher_crypt(skreq, false); in nitrox_aes_decrypt()
228 static int nitrox_3des_encrypt(struct skcipher_request *skreq) in nitrox_3des_encrypt() argument
230 return nitrox_skcipher_crypt(skreq, true); in nitrox_3des_encrypt()
233 static int nitrox_3des_decrypt(struct skcipher_request *skreq) in nitrox_3des_decrypt() argument
235 return nitrox_skcipher_crypt(skreq, false); in nitrox_3des_decrypt()