On 7/28/2020 10:19 AM, Herbert Xu wrote: > @@ -40,30 +39,41 @@ static int chacha_stream_xor(struct skcipher_request *req, > static int crypto_chacha_crypt(struct skcipher_request *req) > { > struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); > + struct chacha_reqctx *rctx = skcipher_request_ctx(req); > struct chacha_ctx *ctx = crypto_skcipher_ctx(tfm); > > - return chacha_stream_xor(req, ctx, req->iv); > + if (!rctx->init) > + chacha_init_generic(rctx->state, ctx->key, req->iv); It would probably be better to rename "init" to "no_init" or "final". Horia