data = req;
if (req->src != req->dst) {
- struct scatterlist srcbuf[2];
- struct scatterlist dstbuf[2];
struct blkcipher_desc desc = {
.tfm = ctx->null,
};
- err = crypto_blkcipher_encrypt(
- &desc,
- scatterwalk_ffwd(dstbuf, req->dst,
- req->assoclen + ivsize),
- scatterwalk_ffwd(srcbuf, req->src,
- req->assoclen + ivsize),
- req->cryptlen - ivsize);
+ err = crypto_blkcipher_encrypt(&desc, req->dst, req->src,
+ req->assoclen + req->cryptlen);
if (err)
return err;
}
info = req->iv;
if (req->src != req->dst) {
- struct scatterlist src[2];
- struct scatterlist dst[2];
struct blkcipher_desc desc = {
.tfm = ctx->null,
};
- err = crypto_blkcipher_encrypt(
- &desc,
- scatterwalk_ffwd(dst, req->dst,
- req->assoclen + ivsize),
- scatterwalk_ffwd(src, req->src,
- req->assoclen + ivsize),
- req->cryptlen - ivsize);
+ err = crypto_blkcipher_encrypt(&desc, req->dst, req->src,
+ req->assoclen + req->cryptlen);
if (err)
return err;
}
}
if (req->src != req->dst) {
- struct scatterlist srcbuf[2];
- struct scatterlist dstbuf[2];
struct blkcipher_desc desc = {
.tfm = ctx->null,
};
- err = crypto_blkcipher_encrypt(
- &desc,
- scatterwalk_ffwd(dstbuf, req->dst,
- req->assoclen + ivsize),
- scatterwalk_ffwd(srcbuf, req->src,
- req->assoclen + ivsize),
- req->cryptlen - ivsize);
+ err = crypto_blkcipher_encrypt(&desc, req->dst, req->src,
+ req->assoclen + req->cryptlen);
if (err)
return err;
}