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