]> err.no Git - linux-2.6/commitdiff
[CRYPTO] geode: Use correct encrypt/decrypt function in fallback
authorSebastian Siewior <sebastian@breakpoint.cc>
Mon, 10 Dec 2007 07:48:17 +0000 (15:48 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 10 Jan 2008 21:16:36 +0000 (08:16 +1100)
crypto_blkcipher_decrypt is wrong because it does not care about
the IV.

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/geode-aes.c

index 68be7d08aeb34de17b506856da68718810a65f64..581b003ad25cad51a11bf696f2edb9054d1c2975 100644 (file)
@@ -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;