Skip to content

Commit 46f8153

Browse files
committed
[CRYPTO] eseqiv: Fix off-by-one encryption
After attaching the IV to the head during encryption, eseqiv does not increase the encryption length by that amount. As such the last block of the actual plain text will be left unencrypted. Fortunately the only user of this code hifn currently crashes so this shouldn't affect anyone :) Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 8ec970d commit 46f8153

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎crypto/eseqiv.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ static int eseqiv_givencrypt(struct skcipher_givcrypt_request *req)
136136
}
137137

138138
ablkcipher_request_set_crypt(subreq, reqctx->src, dst,
139-
req->creq.nbytes, req->creq.info);
139+
req->creq.nbytes + ivsize,
140+
req->creq.info);
140141

141142
memcpy(req->creq.info, ctx->salt, ivsize);
142143

0 commit comments

Comments
 (0)