From: Sebastian Siewior Date: Mon, 10 Dec 2007 07:48:17 +0000 (+0800) Subject: [CRYPTO] geode: Use correct encrypt/decrypt function in fallback X-Git-Tag: v2.6.25-rc1~1242^2~57 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdc520aa693d462f4958339534a3b596f95795b7;p=linux-2.6 [CRYPTO] geode: Use correct encrypt/decrypt function in fallback crypto_blkcipher_decrypt is wrong because it does not care about the IV. Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c index 68be7d08ae..581b003ad2 100644 --- a/drivers/crypto/geode-aes.c +++ b/drivers/crypto/geode-aes.c @@ -190,7 +190,7 @@ static int fallback_blk_dec(struct blkcipher_desc *desc, tfm = desc->tfm; desc->tfm = op->fallback.blk; - ret = crypto_blkcipher_decrypt(desc, dst, src, nbytes); + ret = crypto_blkcipher_decrypt_iv(desc, dst, src, nbytes); desc->tfm = tfm; return ret; @@ -206,7 +206,7 @@ static int fallback_blk_enc(struct blkcipher_desc *desc, tfm = desc->tfm; desc->tfm = op->fallback.blk; - ret = crypto_blkcipher_encrypt(desc, dst, src, nbytes); + ret = crypto_blkcipher_encrypt_iv(desc, dst, src, nbytes); desc->tfm = tfm; return ret;