Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 200429cc authored by Jussi Kivilinna's avatar Jussi Kivilinna Committed by Herbert Xu
Browse files

crypto: cast5/avx - fix storing of new IV in CBC encryption



cast5/avx incorrectly XORs new IV over old IV at end of CBC encryption
function when it should store. This causes CBC encryption to give
incorrect output on multi-page encryption requests.

Signed-off-by: default avatarJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 54216bbd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ static unsigned int __cbc_encrypt(struct blkcipher_desc *desc,
		nbytes -= bsize;
	} while (nbytes >= bsize);

	*(u64 *)walk->iv ^= *iv;
	*(u64 *)walk->iv = *iv;
	return nbytes;
}