Lines Matching defs:req
15 static int chacha_stream_xor(struct skcipher_request *req,
22 err = skcipher_walk_virt(&walk, req, false);
40 static int crypto_chacha_crypt(struct skcipher_request *req)
42 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
45 return chacha_stream_xor(req, ctx, req->iv);
48 static int crypto_xchacha_crypt(struct skcipher_request *req)
50 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
57 chacha_init_generic(state, ctx->key, req->iv);
62 memcpy(&real_iv[0], req->iv + 24, 8); /* stream position */
63 memcpy(&real_iv[8], req->iv + 16, 8); /* remaining 64 nonce bits */
66 return chacha_stream_xor(req, &subctx, real_iv);