projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6350449
)
crypto: echainiv - Copy AD along with plain text
author
Herbert Xu
<herbert@gondor.apana.org.au>
Wed, 27 May 2015 06:37:31 +0000
(14:37 +0800)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Thu, 28 May 2015 03:23:18 +0000
(11:23 +0800)
As the AD does not necessarily exist in the destination buffer
it must be copied along with the plain text.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/echainiv.c
patch
|
blob
|
blame
|
history
diff --git
a/crypto/echainiv.c
b/crypto/echainiv.c
index bd85dcc4fa3d07c7de79abaf950008fa351ff0b5..02d054300a9ab84ae36e0b3c8906a9a53db41dca 100644
(file)
--- a/
crypto/echainiv.c
+++ b/
crypto/echainiv.c
@@
-228,19
+228,13
@@
static int echainiv_encrypt(struct aead_request *req)
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);
+ &desc, req->dst, req->src,
+ req->assoclen + req->cryptlen);
if (err)
return err;
}